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 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 Details

    • DefaultBlobDownloadConfigurator

      public DefaultBlobDownloadConfigurator()
  • Method Details

    • download

      public void download​(javax.servlet.http.HttpServletRequest request, File file, OutputStream outputStream) throws IOException
      Simple copy of file to download on Servlet output stream.
      Specified by:
      download in interface BlobDownloadConfigurator
      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 side
      outputStream - 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