| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.servlet.BinaryFileServlet.DownloadTicket
public static class BinaryFileServlet.DownloadTicket
| Constructor Summary | |
|---|---|
BinaryFileServlet.DownloadTicket(File file)
Builds a new download ticket for the specified file.  | 
|
BinaryFileServlet.DownloadTicket(File file,
                                 String contentType)
Builds a new download ticket for the specified file.  | 
|
BinaryFileServlet.DownloadTicket(File file,
                                 String contentType,
                                 String filename)
Builds a new download ticket for the specified file.  | 
|
| Method Summary | |
|---|---|
 void | 
sendToDownloadUrl(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
Redirect current request to the download URL of the file specified by this ticket.  | 
 void | 
setContentType(String contentType)
Set the content type to use for this download.  | 
 void | 
setDeleteFileAfterDelivery(boolean deleteFileAfterDelivery)
Set whether the file should be deleted after the delivery to the client.  | 
 void | 
setFilename(String filename)
Set the filename to be displayed in the browser (content disposition/attachement) Default value is null (no filename is sent to browser).  | 
 void | 
setUsePragmaNoCache(boolean usePragmaNoCache)
Set whether to use HTTP header "Pragma", "no-cache".  | 
 String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public BinaryFileServlet.DownloadTicket(File file)
file - the file to send required.
public BinaryFileServlet.DownloadTicket(File file,
                                        String contentType)
file - the file to send required.contentType - the content type to use (default is application/octet-stream)
public BinaryFileServlet.DownloadTicket(File file,
                                        String contentType,
                                        String filename)
file - the file to send. required.contentType - the content type to use (default is application/octet-stream)filename - the filename to be displayed in the browser (content disposition/attachement), use alphanumeric or dash, do not use special characters.| Method Detail | 
|---|
public void setContentType(String contentType)
 Default is application/octet-stream.
contentType - a content type such as "image/jpeg"public void setFilename(String filename)
Default value is null (no filename is sent to browser).
filename - a filename such as my-file.csv, use alphanumeric or dash, do not use special characters. or null to skip.public void setUsePragmaNoCache(boolean usePragmaNoCache)
 Default is false.
usePragmaNoCache - true to use pragma/nocache header, false otherwise.public void setDeleteFileAfterDelivery(boolean deleteFileAfterDelivery)
 Default is false.
deleteFileAfterDelivery - true to delete file after delivery, false to leave file as is.
public void sendToDownloadUrl(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws IOException
request - current HttpServletRequestresponse - the response in which to write redirect headers
IOExceptionpublic String toString()
toString in class Object
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||