javax.mail.internet
public class ParameterList extends Object
Constructor and Description |
---|
ParameterList()
Constructor for an empty parameter list.
|
ParameterList(String s)
Constructor with a parameter-list string.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public ParameterList()
public ParameterList(String s) throws ParseException
s
- the parameter-list stringParseException
- if the parse failspublic int size()
public String get(String name)
name
- the parameter namepublic void set(String name, String value)
name
- the parameter namevalue
- the parameter valuepublic void set(String name, String value, String charset)
name
- the parameter namevalue
- the parameter valuecharset
- the character set to use to encode the value, if
mail.mime.encodeparameters
is true.public void remove(String name)
name
- the parameter namepublic Enumeration getNames()
public String toString()
public String toString(int used)
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