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

public Class FileItemHeadersImpl

extends Object
implements FileItemHeaders, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.apache.tomcat.util.http.fileupload.FileItemHeaders
Imports
java.io.Serializable, java.util.ArrayList, .Collections, .Iterator, .LinkedHashMap, .List, .Locale, .Map, org.apache.tomcat.util.http.fileupload.FileItemHeaders

Default implementation of the FileItemHeaders interface.
Since
1.2.1

Field Summary

Modifier and TypeField and Description
private final Map<String, List<String>>
headerNameToValueListMap

Map of String keys to a List of String instances.

private static final long
serialVersionUID

Serial version UID, being used, if serialized.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
addHeader(final String
name of this header
name
,
final String
value of this header
value
)

Method to add header values to this instance.

public String
getHeader(final String
a String specifying the header name
name
)

Implements org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeader.

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

public Iterator<String>
getHeaderNames()

Implements org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeaderNames.

Returns an Iterator of all the header names.

public Iterator<String>
getHeaders(final String
a String specifying the header name
name
)

Implements org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeaders.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

headerNameToValueListMapback to summary
private final Map<String, List<String>> headerNameToValueListMap

Map of String keys to a List of String instances.

serialVersionUIDback to summary
private static final long serialVersionUID

Serial version UID, being used, if serialized.

Constructor Detail

FileItemHeadersImplback to summary
public FileItemHeadersImpl()

Method Detail

addHeaderback to summary
public synchronized void addHeader(final String name, final String value)

Method to add header values to this instance.

Parameters
name:String

name of this header

value:String

value of this header

getHeaderback to summary
public String getHeader(final String name)

Implements org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeader.

Doc from org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeader.

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

Annotations
@Override
getHeaderNamesback to summary
public Iterator<String> getHeaderNames()

Implements org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeaderNames.

Doc from org.apache.tomcat.util.http.fileupload.FileItemHeaders.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

Annotations
@Override
getHeadersback to summary
public Iterator<String> getHeaders(final String name)

Implements org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeaders.

Doc from org.apache.tomcat.util.http.fileupload.FileItemHeaders.getHeaders.

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

Annotations
@Override