Package com.helger.web.fileupload.parse
Class FileItemHeaders
- java.lang.Object
-
- com.helger.web.fileupload.parse.FileItemHeaders
-
- All Implemented Interfaces:
IFileItemHeaders
@ThreadSafe public class FileItemHeaders extends Object implements IFileItemHeaders
Default implementation of theIFileItemHeadersinterface.- Since:
- 1.3
- Author:
- Michael C. Macaluso
-
-
Constructor Summary
Constructors Constructor Description FileItemHeaders()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String sName, String sValue)Method to add header values to this instance.com.helger.commons.collection.impl.ICommonsList<String>getAllHeaderNames()Returns aListof all the header names.StringgetHeader(String sName)Returns the value of the specified part header as aString.StringgetHeaderContentDisposition()StringgetHeaderContentLength()StringgetHeaderContentType()Iterator<String>getHeaderNames()Returns anIteratorof all the header names.Iterator<String>getHeaders(String sName)Returns all the values of the specified item header as anIteratorofStringobjects.StringtoString()
-
-
-
Method Detail
-
getHeader
@Nullable public String getHeader(@Nonnull String sName)
Description copied from interface:IFileItemHeadersReturns the value of the specified part header as aString. If the part did not include a header of the specified name, this method returnnull. 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 interfaceIFileItemHeaders- Parameters:
sName- aStringspecifying the header name- Returns:
- a
Stringcontaining the value of the requested header, ornullif the item does not have a header of that name
-
getHeaderContentDisposition
@Nullable public String getHeaderContentDisposition()
- Specified by:
getHeaderContentDispositionin interfaceIFileItemHeaders
-
getHeaderContentType
@Nullable public String getHeaderContentType()
- Specified by:
getHeaderContentTypein interfaceIFileItemHeaders
-
getHeaderContentLength
@Nullable public String getHeaderContentLength()
- Specified by:
getHeaderContentLengthin interfaceIFileItemHeaders
-
getHeaders
@Nonnull public Iterator<String> getHeaders(@Nonnull String sName)
Description copied from interface:IFileItemHeadersReturns all the values of the specified item header as an
IteratorofStringobjects.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 interfaceIFileItemHeaders- Parameters:
sName- aStringspecifying the header name- Returns:
- an
Enumerationcontaining the values of the requested header. If the item does not have any headers of that name, return an emptyIterator
-
getHeaderNames
@Nonnull public Iterator<String> getHeaderNames()
Description copied from interface:IFileItemHeadersReturns an
Iteratorof all the header names.- Specified by:
getHeaderNamesin interfaceIFileItemHeaders- Returns:
- an
Enumerationcontaining the headers. If the item does not have any headers return an emptyIterator
-
getAllHeaderNames
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<String> getAllHeaderNames()
Description copied from interface:IFileItemHeadersReturns a
Listof all the header names.- Specified by:
getAllHeaderNamesin interfaceIFileItemHeaders- Returns:
- an
Listcontaining the values of the requested header. If the item does not have any headers of that name return an emptyEnumeration
-
addHeader
public void addHeader(@Nonnull String sName, @Nullable String sValue)
Method to add header values to this instance.- Parameters:
sName- name of this headersValue- value of this header
-
-