public class ContentDispositionField extends AbstractField
Content-Disposition field.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DISPOSITION_TYPE_ATTACHMENT
The
attachment disposition type. |
static java.lang.String |
DISPOSITION_TYPE_INLINE
The
inline disposition type. |
static java.lang.String |
PARAM_CREATION_DATE
The name of the
creation-date parameter. |
static java.lang.String |
PARAM_FILENAME
The name of the
filename parameter. |
static java.lang.String |
PARAM_MODIFICATION_DATE
The name of the
modification-date parameter. |
static java.lang.String |
PARAM_READ_DATE
The name of the
read-date parameter. |
static java.lang.String |
PARAM_SIZE
The name of the
size parameter. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Date |
getCreationDate()
Gets the value of the
creation-date parameter if set and
valid. |
java.lang.String |
getDispositionType()
Gets the disposition type defined in this Content-Disposition field.
|
java.lang.String |
getFilename()
Gets the value of the
filename parameter if set. |
java.util.Date |
getModificationDate()
Gets the value of the
modification-date parameter if set
and valid. |
java.lang.String |
getParameter(java.lang.String name)
Gets the value of a parameter.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Gets all parameters.
|
ParseException |
getParseException()
Gets the exception that was raised during parsing of the field value, if
any; otherwise, null.
|
java.util.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(java.lang.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, getParser, getRaw, isValidField, parse, parse, toStringpublic static final java.lang.String DISPOSITION_TYPE_INLINE
inline disposition type.public static final java.lang.String DISPOSITION_TYPE_ATTACHMENT
attachment disposition type.public static final java.lang.String PARAM_FILENAME
filename parameter.public static final java.lang.String PARAM_CREATION_DATE
creation-date parameter.public static final java.lang.String PARAM_MODIFICATION_DATE
modification-date parameter.public static final java.lang.String PARAM_READ_DATE
read-date parameter.public static final java.lang.String PARAM_SIZE
size parameter.public ParseException getParseException()
getParseException in interface ParsedFieldgetParseException in class AbstractFieldnull if the field is valid.ParsedField.getParseException()public java.lang.String getDispositionType()
public java.lang.String getParameter(java.lang.String name)
name - the name of the parameter to get.null if not set.public java.util.Map<java.lang.String,java.lang.String> getParameters()
public boolean isDispositionType(java.lang.String dispositionType)
dispositionType - the disposition type to match against.true if the disposition type of this field
matches, false otherwise.public boolean isInline()
true if the disposition type of this field is
inline, false otherwise.true if the disposition type of this field is
inline, false otherwise.public boolean isAttachment()
true if the disposition type of this field is
attachment, false otherwise.true if the disposition type of this field is
attachment, false otherwise.public java.lang.String getFilename()
filename parameter if set.filename parameter value or null
if not set.public java.util.Date getCreationDate()
creation-date parameter if set and
valid.creation-date parameter value or
null if not set or invalid.public java.util.Date getModificationDate()
modification-date parameter if set
and valid.modification-date parameter value or
null if not set or invalid.public java.util.Date getReadDate()
read-date parameter if set and
valid.read-date parameter value or null
if not set or invalid.public long getSize()
size parameter if set and valid.size parameter value or -1 if
not set or invalid.Copyright © 2004-2012. All Rights Reserved.