Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util
Class MultipartParamUtils

java.lang.Object
  extended by com.jivesoftware.util.MultipartParamUtils

public class MultipartParamUtils
extends java.lang.Object

This class retrieves web page parameters from a multipart/form-data encoded HTML form and stores them as key/values pairs. It also stores any parameters found in the ServletRequest object (non-multipart/form-data parameters).

See Also:
ParamUtils

Constructor Summary
MultipartParamUtils(javax.servlet.ServletRequest request, int maxRequestSize)
          Initialize the class with the ServletRequest object and the maximum allowable request size (in bytes).
 
Method Summary
 boolean getBooleanParameter(java.lang.String name)
           
 int getIntParameter(java.lang.String name, int defaultValue)
           
 long getLongParameter(java.lang.String name, long defaultValue)
           
 java.lang.String getParameter(java.lang.String name)
           
 java.lang.String getParameter(java.lang.String name, boolean emptyStringOK)
           
 java.lang.String getParameterContentType(java.lang.String name)
          Returns the content type of the named parameter.
 java.io.InputStream getParameterData(java.lang.String name)
          Returns an InputStream of the given parameter's data.
 java.util.Iterator getParameterNames()
           
 int getParameterSize(java.lang.String name)
          Returns the size of the given parameter in bytes or 0 if the parameter is not found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartParamUtils

public MultipartParamUtils(javax.servlet.ServletRequest request,
                           int maxRequestSize)
                    throws java.io.IOException
Initialize the class with the ServletRequest object and the maximum allowable request size (in bytes).

Parameters:
request - the ServletRequest object
maxRequestSize - the maximum allowable incoming request size, in bytes.
Throws:
java.io.IOException
Method Detail

getParameterNames

public java.util.Iterator getParameterNames()

getParameter

public java.lang.String getParameter(java.lang.String name,
                                     boolean emptyStringOK)

getParameter

public java.lang.String getParameter(java.lang.String name)

getIntParameter

public int getIntParameter(java.lang.String name,
                           int defaultValue)

getLongParameter

public long getLongParameter(java.lang.String name,
                             long defaultValue)

getBooleanParameter

public boolean getBooleanParameter(java.lang.String name)

getParameterData

public java.io.InputStream getParameterData(java.lang.String name)
Returns an InputStream of the given parameter's data. Will return null if the name is invalid or the parameter is not found.


getParameterSize

public int getParameterSize(java.lang.String name)
Returns the size of the given parameter in bytes or 0 if the parameter is not found.


getParameterContentType

public java.lang.String getParameterContentType(java.lang.String name)
Returns the content type of the named parameter. Returns null if the name is invalid or "application/octet-stream" if the type is unknown.


Jive Forums Project Page

Copyright © 1999-2006 Jive Software.