javax.mail.internet
Class ParameterList
java.lang.Object
javax.mail.internet.ParameterList
public class ParameterList
extends java.lang.Object
A list of MIME parameters. MIME parameters are name-value pairs
associated with a MIME header.
String | get(String name) - Returns the value of the specified parameter.
|
Enumeration | getNames() - Returns the names of all parameters in this list.
|
void | remove(String name) - Removes the specified parameter from this list.
|
void | set(String name, String value) - Sets the specified parameter.
|
void | set(String name, String value, String charset) - Sets the specified parameter.
|
int | size() - Returns the number of parameters in this list.
|
String | toString() - Returns the MIME string representation of this parameter list.
|
String | toString(int used) - Returns the MIME string representation of this parameter list.
|
ParameterList
public ParameterList()
Constructor for an empty parameter list.
ParameterList
public ParameterList(String s)
throws ParseException
Constructor with a parameter-list string.
s
- the parameter-list string
get
public String get(String name)
Returns the value of the specified parameter.
Parameter names are case insensitive.
name
- the parameter name
getNames
public Enumeration getNames()
Returns the names of all parameters in this list.
remove
public void remove(String name)
Removes the specified parameter from this list.
name
- the parameter name
set
public void set(String name,
String value)
Sets the specified parameter.
name
- the parameter namevalue
- the parameter value
set
public void set(String name,
String value,
String charset)
Sets the specified parameter.
name
- the parameter namevalue
- the parameter valuecharset
- the character set to use to encode the value, if
mail.mime.encodeparameters
is true.
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.
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