devpia.dextuploadnj.support.spring
Class DEXTUploadNJAbstractDownloadableView
- Minimum version supported
- 1.0.0
- Minimum support environment
- JRE 1.6, Spring Framework
- Description
-
It is an abstract class that supports response of file in Spring framework environment. Generally, to implement the file download function on the MVC platform using the Spring framework, The org.springframework.web.servlet.view.BeanNameViewResolver is used. Instead of using a BeanNameViewResolver object, the DEXTUploadNJ provides sub classes that inherit DEXTUploadNJAbstractDownloadableView.
- Constructor
-
DEXTUploadNJAbstractDownloadableView
-
Create an object of the DEXTUploadNJAbstractDownloadableView class.
-
Signatures
public DEXTUploadNJAbstractDownloadableView()
-
- Methods
-
doRenderImpl
-
Does rendering a file to the response object.
-
Signatures
protected abstract void doRenderImpl(FileDownloadable downloader, Map<String, Object> model, HttpServletRequest request, HttpServletResponse response)
-
Parameters
Name Type Description downloader devpia.dextuploadnj.FileDownloadable It is responsible for FileDownloadable object, an engine for writing file information. model java.util.Map<String, Object> a map object with the data needed to render a view request javax.servlet.http.HttpServletRequest the HttpServletRequest object response javax.servlet.http.HttpServletResponse the HttpServletResponse object
getFilename
-
Returns the file name to download.
-
Signatures
public String getFilename()
-
Returns
the file name to download
setFilename
-
Sets the file name to download.
-
Signatures
public void setFilename(String filename)
-
Parameters
Name Type Description filename java.lang.String the file name to download
getMime
-
Returns the MIME type of the file to be downloaded.
-
Signatures
public String getMime()
-
Returns
the MIME type
setMime
-
Sets the MIME type of the file to be downloaded.
-
Signatures
public void setMime(String mime)
-
Parameters
Name Type Description mime java.lang.String the MIME type
isInline
-
If the return value of this method is true, the file will not be downloaded and may be opened directly from the browser.
-
Signatures
public boolean isInline()
-
Returns
true, false
setInline
-
Sets whether to download file as an attachment forcibly or to open file data by the client(Web browser) automatically.
-
Signatures
public void setInline(boolean inline)
-
Parameters
Name Type Description inline boolean If true, the file is not downloaded and may be opened directly from the browser.
getCharsetName
-
Returns the character set name used to encode the file name in the Content-Disposition part.
-
Signatures
public String getCharsetName()
-
Returns
the character set name
setCharsetName
-
Sets the character set name used to encode the file name in the Content-Disposition part.
-
Signatures
public void setCharsetName(String charsetName)
-
Parameters
Name Type Description charsetName java.lang.String the character set name
getDownloadStreamBufferSize
-
Returns the size of the download buffer.
-
Signatures
public int getDownloadStreamBufferSize()
-
Returns
The buffer size. The default is 32768 bytes.
setDownloadStreamBufferSize
-
Sets the size of the download buffer.
-
Signatures
public void setDownloadStreamBufferSize(int downloadStreamBufferSize)
-
Parameters
Name Type Description downloadStreamBufferSize int The size of the buffer. The size must be between 4 KB and 4 MB.
getContentDisposition (Supported since version 2.7.0)
-
Returns the method of processing file content in browers.
-
Signatures
public FileResponseContentDisposition getContentDisposition()
-
Returns
devpia.dextuploadnj.FileResponseContentDisposition value (default: AttachmentWithName)
setContentDisposition (Supoorted since version 2.7.0)
-
Sets the method of processing file content in browsers.
-
Signatures
public void setContentDisposition(FileResponseContentDisposition contentDisposition)
-
Parameters
Name Type Description contentDisposition devpia.dextuploadnj.FileResponseContentDisposition The method value of processing file content in browsers
-