-
Field Summary
Fields
The attachment
disposition type.
The inline
disposition type.
The name of the creation-date
parameter.
The name of the filename
parameter.
The name of the modification-date
parameter.
The name of the read-date
parameter.
The name of the size
parameter.
-
Method Summary
default boolean
Gets the value of the creation-date
parameter if set and
valid.
Gets the disposition type defined in this Content-Disposition field.
Gets the value of the filename
parameter if set.
Gets the value of the modification-date
parameter if set
and valid.
Gets the value of a parameter.
Gets the value of the read-date
parameter if set and
valid.
long
Gets the value of the size
parameter if set and valid.
boolean
Return true
if the disposition type of this field is
attachment, false
otherwise.
boolean
Determines if the disposition type of this field matches the given one.
boolean
Return true
if the disposition type of this field is
inline, false
otherwise.
-
Field Details
-
DISPOSITION_TYPE_INLINE
static final String DISPOSITION_TYPE_INLINE
The inline
disposition type.
- See Also:
-
-
DISPOSITION_TYPE_ATTACHMENT
static final String DISPOSITION_TYPE_ATTACHMENT
The attachment
disposition type.
- See Also:
-
-
PARAM_FILENAME
static final String PARAM_FILENAME
The name of the filename
parameter.
- See Also:
-
-
PARAM_CREATION_DATE
static final String PARAM_CREATION_DATE
The name of the creation-date
parameter.
- See Also:
-
-
PARAM_MODIFICATION_DATE
static final String PARAM_MODIFICATION_DATE
The name of the modification-date
parameter.
- See Also:
-
-
PARAM_READ_DATE
static final String PARAM_READ_DATE
The name of the read-date
parameter.
- See Also:
-
-
PARAM_SIZE
static final String PARAM_SIZE
The name of the size
parameter.
- See Also:
-
-
Method Details
-
bodyDescriptionField
default boolean bodyDescriptionField()
- Specified by:
bodyDescriptionField
in interface ParsedField
-
getDispositionType
Gets the disposition type defined in this Content-Disposition field.
- Returns:
- the disposition type or an empty string if not set.
-
getParameter
Gets the value of a parameter. Parameter names are case-insensitive.
- Parameters:
name
- the name of the parameter to get.
- Returns:
- the parameter value or
null
if not set.
-
getParameters
Gets all parameters.
- Returns:
- the parameters.
-
isDispositionType
boolean isDispositionType(String dispositionType)
Determines if the disposition type of this field matches the given one.
- Parameters:
dispositionType
- the disposition type to match against.
- Returns:
true
if the disposition type of this field
matches, false
otherwise.
-
isInline
boolean isInline()
Return true
if the disposition type of this field is
inline, false
otherwise.
- Returns:
true
if the disposition type of this field is
inline, false
otherwise.
-
isAttachment
boolean isAttachment()
Return true
if the disposition type of this field is
attachment, false
otherwise.
- Returns:
true
if the disposition type of this field is
attachment, false
otherwise.
-
getFilename
Gets the value of the filename
parameter if set.
- Returns:
- the
filename
parameter value or null
if not set.
-
getCreationDate
Gets the value of the creation-date
parameter if set and
valid.
- Returns:
- the
creation-date
parameter value or
null
if not set or invalid.
-
getModificationDate
Date getModificationDate()
Gets the value of the modification-date
parameter if set
and valid.
- Returns:
- the
modification-date
parameter value or
null
if not set or invalid.
-
getReadDate
Gets the value of the read-date
parameter if set and
valid.
- Returns:
- the
read-date
parameter value or null
if not set or invalid.
-
getSize
long getSize()
Gets the value of the size
parameter if set and valid.
- Returns:
- the
size
parameter value or -1
if
not set or invalid.