Module com.sun.xml.messaging.saaj
Class ContentDisposition
java.lang.Object
com.sun.xml.messaging.saaj.packaging.mime.internet.ContentDisposition
This class represents a MIME ContentDisposition value. It provides
methods to parse a ContentDisposition string into individual components
and to generate a MIME style ContentDisposition string.
- Version:
- 1.6, 02/03/27
-
Constructor Summary
ConstructorDescriptionNo-arg Constructor.Constructor that takes a ContentDisposition string.ContentDisposition
(String disposition, ParameterList list) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturn the disposition value.getParameter
(String name) Return the specified parameter value.Return a ParameterList object that holds all the available parameters.void
setDisposition
(String disposition) Set the primary type.void
setParameter
(String name, String value) Set the specified parameter.void
Set a new ParameterList.toString()
Retrieve a RFC2045 style string representation of this ContentDisposition.
-
Constructor Details
-
ContentDisposition
public ContentDisposition()No-arg Constructor. -
ContentDisposition
Constructor.- Parameters:
disposition
- dispositionlist
- ParameterList- Since:
- JavaMail 1.2
-
ContentDisposition
Constructor that takes a ContentDisposition string. The String is parsed into its constituents: dispostion and parameters. A ParseException is thrown if the parse fails.- Parameters:
s
- the ContentDisposition string.- Throws:
ParseException
- if the parse fails.- Since:
- JavaMail 1.2
-
-
Method Details
-
getDisposition
Return the disposition value.- Returns:
- the disposition
- Since:
- JavaMail 1.2
-
getParameter
Return the specified parameter value. Returnsnull
if this parameter is absent.- Parameters:
name
- parameter name.- Returns:
- parameter value
- Since:
- JavaMail 1.2
-
getParameterList
Return a ParameterList object that holds all the available parameters. Returns null if no parameters are available.- Returns:
- ParameterList
- Since:
- JavaMail 1.2
-
setDisposition
Set the primary type. Overrides existing primary type.- Parameters:
disposition
- disposition value- Since:
- JavaMail 1.2
-
setParameter
Set the specified parameter. If this parameter already exists, it is replaced by this new value.- Parameters:
name
- parameter namevalue
- parameter value- Since:
- JavaMail 1.2
-
setParameterList
Set a new ParameterList.- Parameters:
list
- ParameterList- Since:
- JavaMail 1.2
-
toString
Retrieve a RFC2045 style string representation of this ContentDisposition. Returnsnull
if the conversion failed.
-