public class RequestData extends Object
RequestData
...Constructor and Description |
---|
RequestData(javax.servlet.http.HttpServletRequest request,
File tmpDir) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose resources used.
|
InputStream[] |
getFileParameters(String name)
Returns an array of input streams for uploaded file parameters.
|
String |
getParameter(String name)
Returns the first value of the parameter with the given
name . |
Iterator<String> |
getParameterNames()
Returns an iterator over all parameter names.
|
String[] |
getParameterTypes(String name)
Returns the content types retrieved for parameters with the specified
name from the multipart or
null if the multipart does not
contain parameter(s) with the given name. |
String[] |
getParameterValues(String name)
Returns an array of Strings with all values of the parameter addressed
by
name . |
public RequestData(javax.servlet.http.HttpServletRequest request, File tmpDir) throws IOException
IOException
public void dispose()
public Iterator<String> getParameterNames()
public String getParameter(String name)
name
.
The byte to string conversion is done using either the content type of
the parameter or the formEncoding
.
Please note that if the addressed parameter is a file parameter, the name of the original file is returned, and not its content.
name
- the name of the parameternull
if the
parameter does not existpublic String[] getParameterTypes(String name)
null
if the multipart does not
contain parameter(s) with the given name.name
- parameter namenull
.public String[] getParameterValues(String name)
name
. the byte to string conversion is done using either
the content type of the multipart body or the formEncoding
.
Please note that if the addressed parameter is a file parameter, the name of the original file is returned, and not its content.
name
- the name of the parameternull
if the parameter
does not exist.public InputStream[] getFileParameters(String name) throws IOException
name
- the name of the file parameter(s)IOException
- if an I/O error occursCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.