Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.dispatcher.multipart
Interface MultiPartRequest

All Known Implementing Classes:
  JakartaMultiPartRequest

    public interface MultiPartRequest

Abstract wrapper class HTTP requests to handle multi-part data.

Method Summary
`java.lang.String[]` | `getContentType(java.lang.String fieldName)` Returns the content type(s) of the file(s) associated with the specified field name (as supplied by the client browser), or `null` if no files are associated with the given field name.
`java.util.List` | `getErrors()` Returns a list of error messages that may have occurred while processing the request.
`java.io.File[]` | `getFile(java.lang.String fieldName)` Returns a `File` object for the filename specified or `null` if no files are associated with the given field name.
`java.lang.String[]` | `getFileNames(java.lang.String fieldName)` Returns a String[] of file names for files associated with the specified input field name
`java.util.Enumeration<java.lang.String>` | `getFileParameterNames()` Returns an enumeration of the parameter names for uploaded files
`java.lang.String[]` | `getFilesystemName(java.lang.String fieldName)` Returns the file system name(s) of files associated with the given field name or `null` if no files are associated with the given field name.
`java.lang.String` | `getParameter(java.lang.String name)` Returns the specified request parameter.
`java.util.Enumeration<java.lang.String>` | `getParameterNames()` Returns an enumeration of String parameter names.
`java.lang.String[]` | `getParameterValues(java.lang.String name)` Returns a list of all parameter values associated with a parameter name.
`void` | `parse(javax.servlet.http.HttpServletRequest request, java.lang.String saveDir)`

Method Detail

### parse

    void parse(javax.servlet.http.HttpServletRequest request,
               java.lang.String saveDir)
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### getFileParameterNames

    java.util.Enumeration<java.lang.String> getFileParameterNames()

  Returns an enumeration of the parameter names for uploaded files

  Returns:
    an enumeration of the parameter names for uploaded files

### getContentType

    java.lang.String[] getContentType(java.lang.String fieldName)

  Returns the content type(s) of the file(s) associated with the specified field name (as supplied by the client browser), or `null` if no files are associated with the given field name.

  Parameters:
    `fieldName` - input field name
  Returns:
    an array of content encoding for the specified input field name or `null` if no content type was specified.

### getFile

    java.io.File[] getFile(java.lang.String fieldName)

  Returns a `File` object for the filename specified or `null` if no files are associated with the given field name.

  Parameters:
    `fieldName` - input field name
  Returns:
    a File[] object for files associated with the specified input field name

### getFileNames

    java.lang.String[] getFileNames(java.lang.String fieldName)

  Returns a String[] of file names for files associated with the specified input field name

  Parameters:
    `fieldName` - input field name
  Returns:
    a String[] of file names for files associated with the specified input field name

### getFilesystemName

    java.lang.String[] getFilesystemName(java.lang.String fieldName)

  Returns the file system name(s) of files associated with the given field name or `null` if no files are associated with the given field name.

  Parameters:
    `fieldName` - input field name
  Returns:
    the file system name(s) of files associated with the given field name

### getParameter

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

  Returns the specified request parameter.

  Parameters:
    `name` - the name of the parameter to get
  Returns:
    the parameter or `null` if it was not found.

### getParameterNames

    java.util.Enumeration<java.lang.String> getParameterNames()

  Returns an enumeration of String parameter names.

  Returns:
    an enumeration of String parameter names.

### getParameterValues

    java.lang.String[] getParameterValues(java.lang.String name)

  Returns a list of all parameter values associated with a parameter name. If there is only one parameter value per name the resulting array will be of length 1.

  Parameters:
    `name` - the name of the parameter.
  Returns:
    an array of all values associated with the parameter name.

### getErrors

    java.util.List getErrors()

  Returns a list of error messages that may have occurred while processing the request. If there are no errors, an empty list is returned. If the underlying implementation (ie: pell, cos, jakarta, etc) cannot support providing these errors, an empty list is also returned. This list of errors is repoted back to the `MultiPartRequestWrapper`'s errors field.

  Returns:
    a list of Strings that represent various errors during parsing

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.