Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.util
Class MultiPartFormData

    java.lang.Object
      |
      +--com.compoze.util.MultiPartFormData

All Implemented Interfaces:
  java.io.Serializable

public class MultiPartFormData
extends java.lang.Object
implements java.io.Serializable

This class parses multi-part form data from a servlet and allows the retrieval of each part.

See Also:
  `Part`, Serialized Form

Field Summary
`static java.lang.String` | `EXPECTED_CONTENT_TYPE` Expected content type for multipart form data.

Constructor Summary
`MultiPartFormData(javax.servlet.ServletRequest request)` Constructor.

Method Summary
`int` | `getCount()` Get the total number of parts.
`Part` | `getPart(int iIndex)` Return a part by its index (indices start at 0).
`Part` | `getPart(java.lang.String sName)` Return a part by its name.
`java.util.Collection` | `getParts(java.lang.String sName)` Return parts by its name.

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

Field Detail

### EXPECTED_CONTENT_TYPE

    public static final java.lang.String EXPECTED_CONTENT_TYPE

  Expected content type for multipart form data.

Constructor Detail

### MultiPartFormData

    public MultiPartFormData(javax.servlet.ServletRequest request)
                      throws java.io.IOException

  Constructor. Reads all data from multi-part form into memory. The ServletInputStream is closed after data is read.
  Parameters:
    `request` - the servlet request
  Throws:
    `java.io.IOException` - if an i/o error occurred

Method Detail

### getPart

    public Part getPart(int iIndex)

  Return a part by its index (indices start at 0).
  Parameters:
    `iIndex` - the index of part to get
  Returns:
    the part
  Throws:
    `IndexOutOfBoundsException` - if a part with the given index does not exist

### getPart

    public Part getPart(java.lang.String sName)

  Return a part by its name.
  Parameters:
    `sName` - the name of part to get
  Returns:
    the part
  Throws:
    `IndexOutOfBoundsException` - if a part with the given index does not exist

### getParts

    public java.util.Collection getParts(java.lang.String sName)

  Return parts by its name.
  Parameters:
    `sName` - the name of part to get
  Returns:
    the parts
  Throws:
    `IndexOutOfBoundsException` - if a part with the given index does not exist

### getCount

    public int getCount()

  Get the total number of parts.
  Returns:
    the total number of parts

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.