public class

ContentDisposition

extends Object
java.lang.Object
   ↳ com.google.code.javax.mail.internet.ContentDisposition

Class Overview

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.

Summary

Fields
private String disposition
private ParameterList list
Public Constructors
ContentDisposition()
No-arg Constructor.
ContentDisposition(String disposition, ParameterList list)
Constructor.
ContentDisposition(String s)
Constructor that takes a ContentDisposition string.
Public Methods
String getDisposition()
Return the disposition value.
String getParameter(String name)
Return the specified parameter value.
ParameterList getParameterList()
Return a ParameterList object that holds all the available parameters.
void setDisposition(String disposition)
Set the disposition.
void setParameter(String name, String value)
Set the specified parameter.
void setParameterList(ParameterList list)
Set a new ParameterList.
String toString()
Retrieve a RFC2045 style string representation of this ContentDisposition.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private String disposition

private ParameterList list

Public Constructors

public ContentDisposition ()

No-arg Constructor.

public ContentDisposition (String disposition, ParameterList list)

Constructor.

Parameters
disposition Disposition
list ParameterList

public ContentDisposition (String s)

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.

Public Methods

public String getDisposition ()

Return the disposition value.

Returns
  • the disposition

public String getParameter (String name)

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

Parameters
name
Returns
  • parameter value

public ParameterList getParameterList ()

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

Returns
  • ParameterList

public void setDisposition (String disposition)

Set the disposition. Replaces the existing disposition.

Parameters
disposition The disposition

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 Parameter name
value Parameter value

public void setParameterList (ParameterList list)

Set a new ParameterList.

Parameters
list ParameterList

public String toString ()

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

Returns
  • RFC2045 style string