Class FileItemHeadersImpl
java.lang.Object
org.apache.commons.fileupload2.core.FileItemHeadersImpl
- All Implemented Interfaces:
FileItemHeaders
Default implementation of the
FileItemHeaders interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionMap ofStringkeys to aListofStringinstances. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod to add header values to this instance.Gets the value of the specified part header as aString.Gets anIteratorof all the header names.getHeaders(String name) Gets all the values of the specified item header as anIteratorofStringobjects.private StringtoLowerCase(String value)
-
Field Details
-
headerNameToValueListMap
Map ofStringkeys to aListofStringinstances.
-
-
Constructor Details
-
FileItemHeadersImpl
FileItemHeadersImpl()
-
-
Method Details
-
addHeader
Method to add header values to this instance.- Specified by:
addHeaderin interfaceFileItemHeaders- Parameters:
name- name of this headervalue- value of this header
-
getHeader
Gets the value of the specified part header as aString.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:
getHeaderin interfaceFileItemHeaders- Parameters:
name- aStringspecifying the header name- Returns:
- a
Stringcontaining the value of the requested header, ornullif the item does not have a header of that name
-
getHeaderNames
Gets anIteratorof all the header names.- Specified by:
getHeaderNamesin interfaceFileItemHeaders- Returns:
- an
Iteratorcontaining all of the names of headers provided with this file item. If the item does not have any headers return an emptyIterator
-
getHeaders
Gets all the values of the specified item header as anIteratorofStringobjects.If the item did not include any headers of the specified name, this method returns an empty
Iterator. The header name is case insensitive.- Specified by:
getHeadersin interfaceFileItemHeaders- Parameters:
name- aStringspecifying the header name- Returns:
- an
Iteratorcontaining the values of the requested header. If the item does not have any headers of that name, return an emptyIterator
-
getList
-
toLowerCase
-