public class ContentDispositionFieldImpl extends AbstractField implements ContentDispositionField
Content-Disposition
field.Modifier and Type | Field and Description |
---|---|
static FieldParser<ContentDispositionField> |
PARSER |
monitor, rawField
DISPOSITION_TYPE_ATTACHMENT, DISPOSITION_TYPE_INLINE, PARAM_CREATION_DATE, PARAM_FILENAME, PARAM_MODIFICATION_DATE, PARAM_READ_DATE, PARAM_SIZE
Modifier and Type | Method and Description |
---|---|
Date |
getCreationDate()
Gets the value of the
creation-date parameter if set and
valid. |
String |
getDispositionType()
Gets the disposition type defined in this Content-Disposition field.
|
String |
getFilename()
Gets the value of the
filename parameter if set. |
Date |
getModificationDate()
Gets the value of the
modification-date parameter if set
and valid. |
String |
getParameter(String name)
Gets the value of a parameter.
|
Map<String,String> |
getParameters()
Gets all parameters.
|
ParseException |
getParseException()
Gets the exception that was raised during parsing of the field value, if
any; otherwise, null.
|
Date |
getReadDate()
Gets the value of the
read-date parameter if set and
valid. |
long |
getSize()
Gets the value of the
size parameter if set and valid. |
boolean |
isAttachment()
Return
true if the disposition type of this field is
attachment, false otherwise. |
boolean |
isDispositionType(String dispositionType)
Determines if the disposition type of this field matches the given one.
|
boolean |
isInline()
Return
true if the disposition type of this field is
inline, false otherwise. |
getBody, getName, getRaw, getRawField, isValidField, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isValidField
public static final FieldParser<ContentDispositionField> PARSER
public ParseException getParseException()
getParseException
in interface ParsedField
getParseException
in class AbstractField
null
if the field is valid.ParsedField.getParseException()
public String getDispositionType()
ContentDispositionField
getDispositionType
in interface ContentDispositionField
ContentDispositionField.getDispositionType()
public String getParameter(String name)
ContentDispositionField
getParameter
in interface ContentDispositionField
name
- the name of the parameter to get.null
if not set.ContentDispositionField.getParameter(java.lang.String)
public Map<String,String> getParameters()
ContentDispositionField
getParameters
in interface ContentDispositionField
ContentDispositionField.getParameters()
public boolean isDispositionType(String dispositionType)
ContentDispositionField
isDispositionType
in interface ContentDispositionField
dispositionType
- the disposition type to match against.true
if the disposition type of this field
matches, false
otherwise.ContentDispositionField.isDispositionType(java.lang.String)
public boolean isInline()
ContentDispositionField
true
if the disposition type of this field is
inline, false
otherwise.isInline
in interface ContentDispositionField
true
if the disposition type of this field is
inline, false
otherwise.ContentDispositionField.isInline()
public boolean isAttachment()
ContentDispositionField
true
if the disposition type of this field is
attachment, false
otherwise.isAttachment
in interface ContentDispositionField
true
if the disposition type of this field is
attachment, false
otherwise.ContentDispositionField.isAttachment()
public String getFilename()
ContentDispositionField
filename
parameter if set.getFilename
in interface ContentDispositionField
filename
parameter value or null
if not set.ContentDispositionField.getFilename()
public Date getCreationDate()
ContentDispositionField
creation-date
parameter if set and
valid.getCreationDate
in interface ContentDispositionField
creation-date
parameter value or
null
if not set or invalid.ContentDispositionField.getCreationDate()
public Date getModificationDate()
ContentDispositionField
modification-date
parameter if set
and valid.getModificationDate
in interface ContentDispositionField
modification-date
parameter value or
null
if not set or invalid.ContentDispositionField.getModificationDate()
public Date getReadDate()
ContentDispositionField
read-date
parameter if set and
valid.getReadDate
in interface ContentDispositionField
read-date
parameter value or null
if not set or invalid.ContentDispositionField.getReadDate()
public long getSize()
ContentDispositionField
size
parameter if set and valid.getSize
in interface ContentDispositionField
size
parameter value or -1
if
not set or invalid.ContentDispositionField.getSize()
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.