public final class ContentDisposition extends ParameterizedHeader
Constructor and Description |
---|
ContentDisposition()
Initializes a new
ContentDisposition |
ContentDisposition(java.lang.String contentDisp)
Initializes a new
ContentDisposition |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ParameterizedHeader other) |
boolean |
containsFilenameParameter() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDisposition() |
java.lang.String |
getFilenameParameter() |
int |
hashCode() |
boolean |
isAttachment()
Checks if disposition is attachment
|
boolean |
isInline()
Checks if disposition is inline
|
void |
setAttachment()
Sets the disposition to
"attachment" . |
void |
setContentDisposition(ContentDisposition contentDisp)
Applies given content disposition to this content disposition
|
void |
setContentDisposition(java.lang.String contentDisp)
Sets Content-Disposition
|
void |
setDisposition(java.lang.String disposition)
Sets disposition
|
void |
setFilenameParameter(java.lang.String filename)
Sets filename parameter
|
void |
setInline()
Sets the disposition to
"inline" . |
java.lang.String |
toString() |
java.lang.String |
toString(boolean skipEmptyParams)
Returns a RFC2045 style (ASCII-only) string representation of this content disposition.
|
addParameter, clearParameters, containsParameter, getParameter, getParameterNames, removeParameter, setParameter
public ContentDisposition()
ContentDisposition
public ContentDisposition(java.lang.String contentDisp) throws com.openexchange.exception.OXException
ContentDisposition
contentDisp
- The content dispositioncom.openexchange.exception.OXException
- If content disposition cannot be parsedpublic int compareTo(ParameterizedHeader other)
compareTo
in interface java.lang.Comparable<ParameterizedHeader>
compareTo
in class ParameterizedHeader
public int hashCode()
hashCode
in class ParameterizedHeader
public boolean equals(java.lang.Object obj)
equals
in class ParameterizedHeader
public void setContentDisposition(ContentDisposition contentDisp)
contentDisp
- The content disposition to applypublic java.lang.String getDisposition()
public void setDisposition(java.lang.String disposition)
public void setInline()
"inline"
.public void setAttachment()
"attachment"
.public void setFilenameParameter(java.lang.String filename)
public java.lang.String getFilenameParameter()
null
if not presentpublic boolean containsFilenameParameter()
true
if filename parameter is present, false
otherwisepublic void setContentDisposition(java.lang.String contentDisp) throws com.openexchange.exception.OXException
com.openexchange.exception.OXException
public boolean isInline()
true
if disposition is inline; otherwise false
public boolean isAttachment()
true
if disposition is attachment; otherwise false
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean skipEmptyParams)
skipEmptyParams
- true
to skip empty parameters; otherwise false