javax.mail.internet

Class ContentDisposition


public class ContentDisposition
extends java.lang.Object

A MIME Content-Disposition value.
Version:
1.4
Author:
Chris Burdess

Constructor Summary

ContentDisposition()
Constructor for an empty Content-Disposition.
ContentDisposition(String s)
Constructor that parses a Content-Disposition value from an RFC 2045 string representation.
ContentDisposition(String disposition, ParameterList list)
Constructor.

Method Summary

String
getDisposition()
Returns the disposition value.
String
getParameter(String name)
Returns the specified parameter value, or null if this parameter is not present.
ParameterList
getParameterList()
Returns the parameters, or null if there are no parameters.
void
setDisposition(String disposition)
Sets the disposition value.
void
setParameter(String name, String value)
Sets the specified parameter.
void
setParameterList(ParameterList list)
Sets the parameters.
String
toString()
Returns an RFC 2045 string representation of this Content-Disposition.

Constructor Details

ContentDisposition

public ContentDisposition()
Constructor for an empty Content-Disposition.

ContentDisposition

public ContentDisposition(String s)
            throws ParseException
Constructor that parses a Content-Disposition value from an RFC 2045 string representation.
Parameters:
s - the Content-Disposition value
Throws:
ParseException - if there was an error in the value

ContentDisposition

public ContentDisposition(String disposition,
                          ParameterList list)
Constructor.
Parameters:
disposition - the disposition value
list - the parameters

Method Details

getDisposition

public String getDisposition()
Returns the disposition value.

getParameter

public String getParameter(String name)
Returns the specified parameter value, or null if this parameter is not present.
Parameters:
name - the parameter name

getParameterList

public ParameterList getParameterList()
Returns the parameters, or null if there are no parameters.

setDisposition

public void setDisposition(String disposition)
Sets the disposition value.
Parameters:
disposition - the disposition value

setParameter

public void setParameter(String name,
                         String value)
Sets the specified parameter.
Parameters:
name - the parameter name
value - the parameter value

setParameterList

public void setParameterList(ParameterList list)
Sets the parameters.
Parameters:
list - the parameters

toString

public String toString()
Returns an RFC 2045 string representation of this Content-Disposition.

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved