Skip navigation links

Oracle Multimedia Servlets and JSP Java API Reference
11g Release 1 (11.1)

Part No. B28412-01


oracle.ord.im
Class OrdMultipartWrapper

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by oracle.ord.im.OrdMultipartWrapper

All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class OrdMultipartWrapper
extends javax.servlet.http.HttpServletRequestWrapper

The OrdMultipartWrapper class wraps the HttpServletRequest object and provides access to the contents in the HTTP request that are encoded using multipart/form-data encoding. This class overrides some of the methods in the HttpServletRequestWrapper class to provide access to the text-based form field parameters. This class also defines new methods to provide access to the uploaded files.

Prerequisites

In order to run Oracle Multimedia methods for servlets and JSP, you will need to import classes from the oracle.ord.im package into your Java file.

You may also need to import classes from the following Java packages:

 java.sql.
 java.io.
 javax.servlet.
 javax.servlet.http.
 oracle.jdbc.
 oracle.sql.

Field Summary

 

Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH

 

Constructor Summary
OrdMultipartWrapper(javax.servlet.http.HttpServletRequest req, int maxMemory, java.lang.String tempDir)
          Creates an OrdMultipartWrapper object that wraps the HttpServletRequest object with multipart/form-data content.

 

Method Summary
 OrdHttpUploadFile getFileParameter(java.lang.String parameterName)
          Gets information about an uploaded file identified by the file's parameter name as an OrdHttpUploadFile object.
 java.util.Enumeration getFileParameterNames()
          Returns an Enumeration of the names of all the input fields of type file in an HTML form.
 OrdHttpUploadFile[] getFileParameterValues(java.lang.String parameterName)
          Gets an array of OrdHttpUploadFile objects that represents all the files uploaded using the specified parameter name.
 java.lang.String getParameter(java.lang.String name)
          Returns the value of the first query string parameter or text-based form field parameter with the specified name, or null if the parameter does not exist.
 java.util.Map getParameterMap()
          Returns a java.util.Map of the query string parameters and text-based form field data parameters.
 java.util.Enumeration getParameterNames()
          Returns an Enumeration of all the query string parameter names and all the text-based form field parameter names in the request, or an empty Enumeration if there are no query string parameters and no text-based form field parameters.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns an array of String objects containing the values of all the query string parameters and text-based form field data parameters with the specified parameter name, or null if the parameter does not exist.
 void release()
          Releases the resources owned by an OrdMultipartWrapper object.

 

Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole

 

Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding

 

Constructor Detail

OrdMultipartWrapper

public OrdMultipartWrapper(javax.servlet.http.HttpServletRequest req,
                           int maxMemory,
                           java.lang.String tempDir)
                    throws java.io.IOException
Creates an OrdMultipartWrapper object that wraps the HttpServletRequest object with multipart/form-data content.
Parameters:
req - an object of type HttpServletRequest.
maxMemory - an int that specifies the maximum amount of memory to use by all uploaded files in a request before storing the uploaded file contents in the temporary directory.
tempDir - a String that specifies the temporary directory.
Throws:
java.io.IOException

Method Detail

getParameterNames

public java.util.Enumeration getParameterNames()
Returns an Enumeration of all the query string parameter names and all the text-based form field parameter names in the request, or an empty Enumeration if there are no query string parameters and no text-based form field parameters.
Specified by:
getParameterNames in interface javax.servlet.ServletRequest
Overrides:
getParameterNames in class javax.servlet.ServletRequestWrapper
Returns:
a list of parameter names, as an Enumeration of Strings.

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns the value of the first query string parameter or text-based form field parameter with the specified name, or null if the parameter does not exist.
Specified by:
getParameter in interface javax.servlet.ServletRequest
Overrides:
getParameter in class javax.servlet.ServletRequestWrapper
Parameters:
name - the name of the parameter, as a String.
Returns:
the value of the specified parameter, as a String, or null if the parameter does not exist.

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Returns an array of String objects containing the values of all the query string parameters and text-based form field data parameters with the specified parameter name, or null if the parameter does not exist.
Specified by:
getParameterValues in interface javax.servlet.ServletRequest
Overrides:
getParameterValues in class javax.servlet.ServletRequestWrapper
Parameters:
name - the name of the parameter, as a String.
Returns:
the parameter value, as a String, or null if the parameter does not exist.

getParameterMap

public java.util.Map getParameterMap()
Returns a java.util.Map of the query string parameters and text-based form field data parameters.
Specified by:
getParameterMap in interface javax.servlet.ServletRequest
Overrides:
getParameterMap in class javax.servlet.ServletRequestWrapper
Returns:
an immutable java.util.Map containing parameter names as keys and parameter values as map values.

getFileParameter

public OrdHttpUploadFile getFileParameter(java.lang.String parameterName)
Gets information about an uploaded file identified by the file's parameter name as an OrdHttpUploadFile object. Input fields of type file in an HTML form will produce a parameter of type OrdHttpUploadFile, whether or not valid file names are entered into input fields of this type.
Parameters:
parameterName - the name of the uploaded file parameter, as a String.
Returns:
the uploaded file parameter, as an OrdHttpUploadFile object, or null if the parameter does not exist.
Throws:
java.lang.IllegalStateException - if the multipart form data has not been parsed, or if the upload request has been released.

getFileParameterValues

public OrdHttpUploadFile[] getFileParameterValues(java.lang.String parameterName)
Gets an array of OrdHttpUploadFile objects that represents all the files uploaded using the specified parameter name. Input fields of type file in an HTML form produce a parameter of type OrdHttpUploadFile, whether or not valid file names are entered into input fields of this type.
Parameters:
parameterName - the name of the uploaded file parameter, as a String.
Returns:
uploaded file parameters, as an array of OrdHttpUploadFile objects, or null if the parameter does not exist.
Throws:
java.lang.IllegalStateException - if the multipart form data has not been parsed, or if the upload request has been released.

getFileParameterNames

public java.util.Enumeration getFileParameterNames()
Returns an Enumeration of the names of all the input fields of type file in an HTML form. Input fields of type file in an HTML form produce a parameter of type OrdHttpUploadFile, whether or not valid file names are entered into input fields of this type. This method returns an empty Enumeration if there are no input fields of type file.
Returns:
a list of uploaded file parameter names, as an Enumeration of Strings.
Throws:
java.lang.IllegalStateException - if the multipart form data has not been parsed, or if the upload request has been released.

release

public void release()
Releases the resources owned by an OrdMultipartWrapper object.

Skip navigation links

Oracle Multimedia Servlets and JSP Java API Reference
11g Release 1 (11.1)

Part No. B28412-01


Copyright © 1999, 2007, Oracle. All rights reserved.