Top Description Fields Constructors Methods
javax.mail.internet

public Class ContentDisposition

extends Object
Class Inheritance
Imports
javax.mail.*, java.util.*, java.io.*, com.sun.mail.util.PropUtil

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.
Author
John Mani

Field Summary

Modifier and TypeField and Description
private static final boolean
private String
private ParameterList

Constructor Summary

AccessConstructor and Description
public
ContentDisposition()

No-arg Constructor.

public
ContentDisposition(String
disposition
disposition
,
ParameterList
ParameterList
list
)

Constructor.

public
ContentDisposition(String
the ContentDisposition string.
s
)

Constructor that takes a ContentDisposition string.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the disposition
getDisposition
()

Return the disposition value.

public String

Returns:

parameter value
getParameter
(String
the parameter name
name
)

Return the specified parameter value.

public ParameterList

Returns:

ParameterList
getParameterList
()

Return a ParameterList object that holds all the available parameters.

public void
setDisposition(String
the disposition
disposition
)

Set the disposition.

public void
setParameter(String
parameter name
name
,
String
parameter value
value
)

Set the specified parameter.

public void
setParameterList(ParameterList
ParameterList
list
)

Set a new ParameterList.

public String

Returns:

RFC2045 style string
toString
()

Overrides java.lang.Object.toString.

Retrieve a RFC2045 style string representation of this ContentDisposition.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

contentDispositionStrictback to summary
private static final boolean contentDispositionStrict
dispositionback to summary
private String disposition
listback to summary
private ParameterList list

Constructor Detail

ContentDispositionback to summary
public ContentDisposition()

No-arg Constructor.

ContentDispositionback to summary
public ContentDisposition(String disposition, ParameterList list)

Constructor.

Parameters
disposition:String

disposition

list:ParameterList

ParameterList

Since
JavaMail 1.2
ContentDispositionback to summary
public ContentDisposition(String s) throws ParseException

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:String

the ContentDisposition string.

Exceptions
ParseException:
if the parse fails.
Since
JavaMail 1.2

Method Detail

getDispositionback to summary
public String getDisposition()

Return the disposition value.

Returns:String

the disposition

Since
JavaMail 1.2
getParameterback to summary
public String getParameter(String name)

Return the specified parameter value. Returns null if this parameter is absent.

Parameters
name:String

the parameter name

Returns:String

parameter value

Since
JavaMail 1.2
getParameterListback to summary
public ParameterList getParameterList()

Return a ParameterList object that holds all the available parameters. Returns null if no parameters are available.

Returns:ParameterList

ParameterList

Since
JavaMail 1.2
setDispositionback to summary
public void setDisposition(String disposition)

Set the disposition. Replaces the existing disposition.

Parameters
disposition:String

the disposition

Since
JavaMail 1.2
setParameterback to summary
public void setParameter(String name, String value)

Set the specified parameter. If this parameter already exists, it is replaced by this new value.

Parameters
name:String

parameter name

value:String

parameter value

Since
JavaMail 1.2
setParameterListback to summary
public void setParameterList(ParameterList list)

Set a new ParameterList.

Parameters
list:ParameterList

ParameterList

Since
JavaMail 1.2
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Retrieve a RFC2045 style string representation of this ContentDisposition. Returns an empty string if the conversion failed.

Returns:String

RFC2045 style string

Annotations
@Override
Since
JavaMail 1.2