javax.mail.internet

Class ParameterList

public class ParameterList extends Object

A list of MIME parameters. MIME parameters are name-value pairs associated with a MIME header.

Version: 1.4

Author: Chris Burdess

Constructor Summary
ParameterList()
Constructor for an empty parameter list.
ParameterList(String s)
Constructor with a parameter-list string.
Method Summary
Stringget(String name)
Returns the value of the specified parameter.
EnumerationgetNames()
Returns the names of all parameters in this list.
voidremove(String name)
Removes the specified parameter from this list.
voidset(String name, String value)
Sets the specified parameter.
voidset(String name, String value, String charset)
Sets the specified parameter.
intsize()
Returns the number of parameters in this list.
StringtoString()
Returns the MIME string representation of this parameter list.
StringtoString(int used)
Returns the MIME string representation of this parameter list.

Constructor Detail

ParameterList

public ParameterList()
Constructor for an empty parameter list.

ParameterList

public ParameterList(String s)
Constructor with a parameter-list string.

Parameters: s the parameter-list string

Throws: ParseException if the parse fails

Method Detail

get

public String get(String name)
Returns the value of the specified parameter. Parameter names are case insensitive.

Parameters: name the parameter name

getNames

public Enumeration getNames()
Returns the names of all parameters in this list.

Returns: an Enumeration of String

remove

public void remove(String name)
Removes the specified parameter from this list.

Parameters: name the parameter name

set

public void set(String name, String value)
Sets the specified parameter.

Parameters: name the parameter name value the parameter value

set

public void set(String name, String value, String charset)
Sets the specified parameter.

Parameters: name the parameter name value the parameter value charset the character set to use to encode the value, if mail.mime.encodeparameters is true.

Since: JavaMail 1.5

size

public int size()
Returns the number of parameters in this list.

toString

public String toString()
Returns the MIME string representation of this parameter list.

toString

public String toString(int used)
Returns the MIME string representation of this parameter list.

Parameters: used the number of character positions already used in the field into which the parameter list is to be inserted

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