|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
net.sf.basedb.core.plugin.ExportOutputStream
net.sf.basedb.clients.web.util.ServletExportOutputStream
public class ServletExportOutputStream
An extension to the ExportOutputStream class which
directs the output to the response stream of a
HttpServletResponse object. This allows an export plugin
to send data directly to the web browser without going throgh
the BASE filesystem or temporary files on the disk.
| Field Summary | |
|---|---|
private HttpServletResponse |
response
|
| Constructor Summary | |
|---|---|
ServletExportOutputStream(HttpServletResponse response)
Create a new servlet export stream. |
|
| Method Summary | |
|---|---|
void |
setCharacterSet(String charset)
Calls ServletResponse.setCharacterEncoding(String) |
void |
setContentLength(long contentLength)
Calls ServletResponse.setContentLength(int) |
void |
setFilename(String filename)
Calls HttpServletResponse.setHeader(java.lang.String, java.lang.String)
with the following values:
response.setHeader("Content-Disposition", "attachment;filename=<filename>");
If the filename contains unsafe characters it is URL encoded. |
void |
setMimeType(String mimeType)
Calls ServletResponse.setContentType(String) |
| Methods inherited from class net.sf.basedb.core.plugin.ExportOutputStream |
|---|
close, flush, getFile, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final HttpServletResponse response
| Constructor Detail |
|---|
public ServletExportOutputStream(HttpServletResponse response)
throws IOException
response - The servlet response object
IOException - If getting the output stream from the reponse fails.| Method Detail |
|---|
public void setContentLength(long contentLength)
ServletResponse.setContentLength(int)
setContentLength in class ExportOutputStreampublic void setMimeType(String mimeType)
ServletResponse.setContentType(String)
setMimeType in class ExportOutputStreampublic void setCharacterSet(String charset)
ServletResponse.setCharacterEncoding(String)
setCharacterSet in class ExportOutputStreampublic void setFilename(String filename)
HttpServletResponse.setHeader(java.lang.String, java.lang.String)
with the following values:
response.setHeader("Content-Disposition", "attachment;filename=<filename>");
If the filename contains unsafe characters it is URL encoded.
setFilename in class ExportOutputStream
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||