public interface ContentDispositionField extends ParsedField
Modifier and Type | Field and Description |
---|---|
static String |
DISPOSITION_TYPE_ATTACHMENT
The
attachment disposition type. |
static String |
DISPOSITION_TYPE_INLINE
The
inline disposition type. |
static String |
PARAM_CREATION_DATE
The name of the
creation-date parameter. |
static String |
PARAM_FILENAME
The name of the
filename parameter. |
static String |
PARAM_MODIFICATION_DATE
The name of the
modification-date parameter. |
static String |
PARAM_READ_DATE
The name of the
read-date parameter. |
static String |
PARAM_SIZE
The name of the
size parameter. |
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.
|
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. |
getParseException, isValidField
static final String DISPOSITION_TYPE_INLINE
inline
disposition type.static final String DISPOSITION_TYPE_ATTACHMENT
attachment
disposition type.static final String PARAM_FILENAME
filename
parameter.static final String PARAM_CREATION_DATE
creation-date
parameter.static final String PARAM_MODIFICATION_DATE
modification-date
parameter.static final String PARAM_READ_DATE
read-date
parameter.static final String PARAM_SIZE
size
parameter.String getDispositionType()
String getParameter(String name)
name
- the name of the parameter to get.null
if not set.boolean isDispositionType(String dispositionType)
dispositionType
- the disposition type to match against.true
if the disposition type of this field
matches, false
otherwise.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.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.String getFilename()
filename
parameter if set.filename
parameter value or null
if not set.Date getCreationDate()
creation-date
parameter if set and
valid.creation-date
parameter value or
null
if not set or invalid.Date getModificationDate()
modification-date
parameter if set
and valid.modification-date
parameter value or
null
if not set or invalid.Date getReadDate()
read-date
parameter if set and
valid.read-date
parameter value or null
if not set or invalid.long getSize()
size
parameter if set and valid.size
parameter value or -1
if
not set or invalid.Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.