|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.yworks.yfiles.server.graphml.servlets.ExportServlet
Simple export servlet that takes the export data from the request and creates a file download for it.
Field Summary | |
static java.lang.String |
PARAM_EXPORT_DATA
|
Constructor Summary | |
ExportServlet()
Calls the ExportServlet(String) constructor using
PARAM_EXPORT_DATA
as the parameter name. |
|
ExportServlet(java.lang.String exportDataParameter)
Calls the ExportServlet(String,String) constructor using
"image/png" as the contentType paramater. |
|
ExportServlet(java.lang.String exportDataParameter,
java.lang.String contentType)
Creates a new instance using the provided export data parameter to get the export data from the HttpServletRequest later in getExportDataInputStream(javax.servlet.http.HttpServletRequest)
from. |
Method Summary | |
protected void |
doGet(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
|
protected void |
doPost(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
|
java.lang.String |
getContentType()
Get the content type that will be used for the response header. |
protected java.io.InputStream |
getExportDataInputStream(HttpServletRequest httpServletRequest)
Retrieves the input stream from the request to read the export data from. |
void |
setContentType(java.lang.String value)
Set the content type that will be used for the response header. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PARAM_EXPORT_DATA
Constructor Detail |
public ExportServlet()
ExportServlet(String)
constructor using
PARAM_EXPORT_DATA
as the parameter name.
public ExportServlet(java.lang.String exportDataParameter)
ExportServlet(String,String)
constructor using
"image/png" as the contentType paramater.
public ExportServlet(java.lang.String exportDataParameter, java.lang.String contentType)
HttpServletRequest
later in getExportDataInputStream(javax.servlet.http.HttpServletRequest)
from.
exportDataParameter
- the name of the parameter of null
if the ServletInputStream
shall be used.contentType
- The content type to use for the response header.Method Detail |
protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws java.io.IOException
java.io.IOException
public java.lang.String getContentType()
Depending on the servlet container configuration, the response content type might determine whether the servlet container sends a compressed response.
"image/png"
.public void setContentType(java.lang.String value)
value
- The content type string. The default is "image/png"..protected java.io.InputStream getExportDataInputStream(HttpServletRequest httpServletRequest) throws java.io.IOException
ServletRequest.getParameter(String)
method using the parameter name specified in the constructor.
If no parameter name has been specified the ServletInputStream
is used.
A Base64InputStream
is wrapped around the used input stream.
httpServletRequest
- the request
java.io.IOException
- if something bad happened.protected void doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, java.io.IOException
ServletException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |