Package org.apache.commons.fileupload
Interface FileItemHeaders
public interface FileItemHeaders
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 TypeMethodDescriptionstatic FileItemHeaders
fromFileUpload2FileItemHeaders
(org.apache.commons.fileupload2.core.FileItemHeaders from) Returns the value of the specified part header as aString
.Returns anIterator
of all the header names.getHeaders
(String name) Returns all the values of the specified item header as anIterator
ofString
objects.default org.apache.commons.fileupload2.core.FileItemHeaders
-
Method Details
-
getHeader
Returns 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.- Parameters:
name
- aString
specifying the header name- Returns:
- a
String
containing the value of the requested header, ornull
if the item does not have a header of that name
-
getHeaders
Returns all the values of the specified item header as an
Iterator
ofString
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
- aString
specifying the header name- Returns:
- an
Iterator
containing the values of the requested header. If the item does not have any headers of that name, return an emptyIterator
-
getHeaderNames
Returns an
Iterator
of all the header names.- 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 emptyIterator
-
toFileUpload2FileItemHeaders
default org.apache.commons.fileupload2.core.FileItemHeaders toFileUpload2FileItemHeaders() -
fromFileUpload2FileItemHeaders
static FileItemHeaders fromFileUpload2FileItemHeaders(org.apache.commons.fileupload2.core.FileItemHeaders from)
-