Package com.franz.agraph.http.handler
Class AGDownloadHandler
java.lang.Object
com.franz.agraph.http.handler.AGResponseHandler
com.franz.agraph.http.handler.AGDownloadHandler
A response handler that writes the returned body to a file.
-
Constructor Summary
ConstructorsConstructorDescriptionAGDownloadHandler
(File file) Creates a download handler that does not specify the MIME type.AGDownloadHandler
(File file, String mimeType) Creates a download handler.AGDownloadHandler
(File file, BooleanQueryResultFormat format) Creates a download handler that requests results in specified boolean format.AGDownloadHandler
(File file, TupleQueryResultFormat format) Creates a download handler that requests results in specified tuple format.AGDownloadHandler
(File file, RDFFormat format) Creates a download handler that requests results in specified RDF format.AGDownloadHandler
(String file) Creates a download handler that does not specify the MIME type.AGDownloadHandler
(String file, String mimeType) Creates a download handler.AGDownloadHandler
(String file, BooleanQueryResultFormat format) Creates a download handler that requests results in specified boolean format.AGDownloadHandler
(String file, TupleQueryResultFormat format) Creates a download handler that requests results in specified tuple format.AGDownloadHandler
(String file, RDFFormat format) Creates a download handler that requests results in specified RDF format. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleResponse
(org.apache.http.HttpResponse httpResponse, HttpUriRequest httpUriRequest) Methods inherited from class com.franz.agraph.http.handler.AGResponseHandler
getRequestMIMEType, releaseConnection
-
Constructor Details
-
AGDownloadHandler
Creates a download handler.- Parameters:
file
- Output path.mimeType
- MIME type to be requested from the server.
-
AGDownloadHandler
Creates a download handler.- Parameters:
file
- Output path.mimeType
- MIME type to be requested from the server.
-
AGDownloadHandler
Creates a download handler that does not specify the MIME type.The server is free to return any content type.
- Parameters:
file
- Output path.
-
AGDownloadHandler
Creates a download handler that does not specify the MIME type.The server is free to return any content type.
- Parameters:
file
- Output path.
-
AGDownloadHandler
Creates a download handler that requests results in specified RDF format.- Parameters:
file
- Output path.format
- Format to return the data in.
-
AGDownloadHandler
Creates a download handler that requests results in specified RDF format.- Parameters:
file
- Output path.format
- Format to return the data in.
-
AGDownloadHandler
Creates a download handler that requests results in specified tuple format.- Parameters:
file
- Output path.format
- Format to return the data in.
-
AGDownloadHandler
Creates a download handler that requests results in specified tuple format.- Parameters:
file
- Output path.format
- Format to return the data in.
-
AGDownloadHandler
Creates a download handler that requests results in specified boolean format.- Parameters:
file
- Output path.format
- Format to return the data in.
-
AGDownloadHandler
Creates a download handler that requests results in specified boolean format.- Parameters:
file
- Output path.format
- Format to return the data in.
-
-
Method Details
-
handleResponse
public void handleResponse(org.apache.http.HttpResponse httpResponse, HttpUriRequest httpUriRequest) throws IOException, AGHttpException - Specified by:
handleResponse
in classAGResponseHandler
- Throws:
IOException
AGHttpException
-