org.apache.jackrabbit.server.util
Class RequestData

java.lang.Object
  extended by org.apache.jackrabbit.server.util.RequestData

public class RequestData
extends Object

RequestData...


Constructor Summary
RequestData(javax.servlet.http.HttpServletRequest request, File tmpDir)
           
 
Method Summary
 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. the byte to string conversion is done using either the content type of the multipart body or the formEncoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 given name. The byte to string converstion is done using either the contenttype 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.

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 or null 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 by 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.

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


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.