Class RequestData
- java.lang.Object
-
- org.apache.jackrabbit.server.util.RequestData
-
public class RequestData extends Object
RequestData
...
-
-
Constructor Summary
Constructors Constructor Description RequestData(javax.servlet.http.HttpServletRequest request, File tmpDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 givenname
.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 ornull
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 byname
.
-
-
-
Constructor Detail
-
RequestData
public RequestData(javax.servlet.http.HttpServletRequest request, File tmpDir) throws IOException
- Throws:
IOException
-
-
Method Detail
-
dispose
public void dispose()
Dispose resources used.
-
getParameterNames
public Iterator<String> getParameterNames()
Returns an iterator over all parameter names.- Returns:
- an iterator over strings.
-
getParameter
public String getParameter(String name)
Returns the first value of the parameter with the givenname
. The byte to string conversion is done using either the content type of the parameter or theformEncoding
.Please note that if the addressed parameter is a file parameter, the name of the original file is returned, and not its content.
- Parameters:
name
- the name of the parameter- Returns:
- the string of the first value or
null
if the parameter does not exist
-
getParameterTypes
public String[] getParameterTypes(String name)
Returns the content types retrieved for parameters with the specified name from the multipart ornull
if the multipart does not contain parameter(s) with the given name.- Parameters:
name
- parameter name- Returns:
- the parameter types retrieved for the specified parameter
name from the multipart or
null
.
-
getParameterValues
public String[] getParameterValues(String name)
Returns an array of Strings with all values of the parameter addressed byname
. the byte to string conversion is done using either the content type of the multipart body or theformEncoding
.Please note that if the addressed parameter is a file parameter, the name of the original file is returned, and not its content.
- Parameters:
name
- the name of the parameter- Returns:
- a string array of values or
null
if the parameter does not exist.
-
getFileParameters
public InputStream[] getFileParameters(String name) throws IOException
Returns an array of input streams for uploaded file parameters.- Parameters:
name
- the name of the file parameter(s)- Returns:
- an array of input streams or an empty array if no file params with the given name exist.
- Throws:
IOException
- if an I/O error occurs
-
-