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.commons.fileupload.util
Class FileItemHeadersImpl

    java.lang.Object
      org.apache.commons.fileupload.util.FileItemHeadersImpl

All Implemented Interfaces:
  java.io.Serializable, FileItemHeaders

    public class FileItemHeadersImpl

extends java.lang.Object
implements FileItemHeaders, java.io.Serializable

Default implementation of the `FileItemHeaders` interface.

Since:
  1.3
Author:
  Michael C. Macaluso
See Also:
  Serialized Form

Constructor Summary
`FileItemHeadersImpl()`

Method Summary
`void` | `addHeader(java.lang.String name, java.lang.String value)` Method to add header values to this instance.
`java.lang.String` | `getHeader(java.lang.String name)` Returns the value of the specified part header as a `String`.
`java.util.Iterator` | `getHeaderNames()` Returns an `Enumeration` of all the header names.
`java.util.Iterator` | `getHeaders(java.lang.String name)` Returns all the values of the specified item header as an `Enumeration` of `String` objects.

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

Constructor Detail

### FileItemHeadersImpl

    public FileItemHeadersImpl()

Method Detail

### getHeader

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

  Description copied from interface: `FileItemHeaders`
  Returns the value of the specified part header as a `String`. If the part did not include a header of the specified name, this method return `null`. If there are multiple headers with the same name, this method returns the first header in the item. The header name is case insensitive.

  Specified by:
    `getHeader` in interface `FileItemHeaders`
  Parameters:
    `name` - a `String` specifying the header name
  Returns:
    a `String` containing the value of the requested header, or `null` if the item does not have a header of that name

### getHeaderNames

    public java.util.Iterator getHeaderNames()

  Description copied from interface: `FileItemHeaders`

  Returns an `Enumeration` of all the header names.

  If the item did not include any headers of the specified name, this method returns an empty `Enumeration`. The header name is case insensitive.

  Specified by:
    `getHeaderNames` in interface `FileItemHeaders`
  Returns:
    an `Enumeration` containing the values of the requested header. If the item does not have any headers of that name return an empty `Enumeration`

### getHeaders

    public java.util.Iterator getHeaders(java.lang.String name)

  Description copied from interface: `FileItemHeaders`

  Returns all the values of the specified item header as an `Enumeration` of `String` objects.

  If the item did not include any headers of the specified name, this method returns an empty `Enumeration`. The header name is case insensitive.

  Specified by:
    `getHeaders` in interface `FileItemHeaders`
  Parameters:
    `name` - a `String` specifying the header name
  Returns:
    an `Enumeration` containing the values of the requested header. If the item does not have any headers of that name, return an empty `Enumeration`

### addHeader

    public void addHeader(java.lang.String name,
                          java.lang.String value)

  Method to add header values to this instance.

  Parameters:
    `name` - name of this header
    `value` - value of this header

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 ? 2002-2008 The Apache Software Foundation. All Rights Reserved.