Package org.kawanfw.sql.api.server.blob
Class DefaultBlobDownloadConfigurator
java.lang.Object
org.kawanfw.sql.api.server.blob.DefaultBlobDownloadConfigurator
- All Implemented Interfaces:
BlobDownloadConfigurator
public class DefaultBlobDownloadConfigurator extends Object implements BlobDownloadConfigurator
Class that allows downloading Blob/Clobs. Default implementation.
It is not required nor recommended to extend this class or to develop another
Extend this class and override
It is not required nor recommended to extend this class or to develop another
BlobDownloadConfigurator
implementation. Extend this class and override
download(HttpServletRequest, File, OutputStream)
only if you want to
implement your own advanced download mechanism with special features: file
chunking, recovery mechanisms, etc.- Author:
- Nicolas de Pomereu
-
Constructor Summary
Constructors Constructor Description DefaultBlobDownloadConfigurator()
-
Method Summary
Modifier and Type Method Description void
download(javax.servlet.http.HttpServletRequest request, File file, OutputStream outputStream)
Simple copy of file to download on Servlet output stream.
-
Constructor Details
-
DefaultBlobDownloadConfigurator
public DefaultBlobDownloadConfigurator()
-
-
Method Details
-
download
public void download(javax.servlet.http.HttpServletRequest request, File file, OutputStream outputStream) throws IOExceptionSimple copy of file to download on Servlet output stream.- Specified by:
download
in interfaceBlobDownloadConfigurator
- Parameters:
request
- the http servlet request. May be use to get supplemental parameters passed by client side.file
- the file to download corresponding to the blob id called by the client sideoutputStream
- the servlet output stream on which to download the file. Must *not* be closed at end of download, because it can be reused to send error message to client side after this method execution- Throws:
IOException
- if any I/O exception occurs during the download
-