Top Description Methods
org.apache.tomcat.util.http.fileupload

public Interface FileItemHeaders

Known Direct Implementers
org.apache.tomcat.util.http.fileupload.util.FileItemHeadersImpl
Imports
java.util.Iterator

This class provides support for accessing the headers for a file or form item that was received within a multipart/form-data POST request.

Since
1.2.1

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a String containing the value of the requested header, or null if the item does not have a header of that name
getHeader
(String
a String specifying the header name
name
)

Returns the value of the specified part header as a String.

public Iterator<String>

Returns:

an Iterator containing all of the names of headers provided with this file item. If the item does not have any headers return an empty Iterator
getHeaderNames
()

Returns an Iterator of all the header names.

public Iterator<String>

Returns:

an Iterator containing the values of the requested header. If the item does not have any headers of that name, return an empty Iterator
getHeaders
(String
a String specifying the header name
name
)

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

Method Detail

getHeaderback to summary
public String getHeader(String name)

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.

Parameters
name:String

a String specifying the header name

Returns:String

a String containing the value of the requested header, or null if the item does not have a header of that name

getHeaderNamesback to summary
public Iterator<String> getHeaderNames()

Returns an Iterator of all the header names.

Returns:Iterator<String>

an Iterator containing all of the names of headers provided with this file item. If the item does not have any headers return an empty Iterator

getHeadersback to summary
public Iterator<String> getHeaders(String name)

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

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

Parameters
name:String

a String specifying the header name

Returns:Iterator<String>

an Iterator containing the values of the requested header. If the item does not have any headers of that name, return an empty Iterator