@ThreadSafe public class FileItemHeaders extends Object implements IFileItemHeaders
IFileItemHeaders interface.| Constructor and Description |
|---|
FileItemHeaders() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String sName,
String sValue)
Method to add header values to this instance.
|
com.helger.commons.collection.impl.ICommonsList<String> |
getAllHeaderNames()
Returns a
List of all the header names. |
String |
getHeader(String sName)
Returns the value of the specified part header as a
String. |
String |
getHeaderContentDisposition() |
String |
getHeaderContentLength() |
String |
getHeaderContentType() |
Iterator<String> |
getHeaderNames()
Returns an
Iterator of all the header names. |
Iterator<String> |
getHeaders(String sName)
Returns all the values of the specified item header as an
Iterator of String objects. |
String |
toString() |
@Nullable public String getHeader(@Nonnull String sName)
IFileItemHeadersString. 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.getHeader in interface IFileItemHeaderssName - a String specifying the header nameString containing the value of the requested header,
or null if the item does not have a header of that
name@Nullable public String getHeaderContentDisposition()
getHeaderContentDisposition in interface IFileItemHeaders@Nullable public String getHeaderContentType()
getHeaderContentType in interface IFileItemHeaders@Nullable public String getHeaderContentLength()
getHeaderContentLength in interface IFileItemHeaders@Nonnull public Iterator<String> getHeaders(@Nonnull String sName)
IFileItemHeaders
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.
getHeaders in interface IFileItemHeaderssName - a String specifying the header nameEnumeration containing the values of the requested
header. If the item does not have any headers of that name, return
an empty Iterator@Nonnull public Iterator<String> getHeaderNames()
IFileItemHeaders
Returns an Iterator of all the header names.
getHeaderNames in interface IFileItemHeadersEnumeration containing the headers. If the item
does not have any headers return an empty Iterator@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<String> getAllHeaderNames()
IFileItemHeaders
Returns a List of all the header names.
getAllHeaderNames in interface IFileItemHeadersList containing the values of the requested header.
If the item does not have any headers of that name return an empty
Enumerationpublic void addHeader(@Nonnull String sName, @Nullable String sValue)
sName - name of this headersValue - value of this headerCopyright © 2014–2019 Philip Helger. All rights reserved.