public class ParameterList
extends java.lang.Object
Constructor and Description |
---|
ParameterList()
Constructor for an empty parameter list.
|
ParameterList(java.lang.String s)
Constructor with a parameter-list string.
|
Modifier and Type | Method and Description |
---|---|
void |
combineSegments()
Combines individual segments of multi-segment names.
|
java.lang.String |
get(java.lang.String name)
Returns the value of the specified parameter.
|
java.util.Enumeration |
getNames()
Returns the names of all parameters in this list.
|
void |
remove(java.lang.String name)
Removes the specified parameter from this list.
|
void |
set(java.lang.String name,
java.lang.String value)
Sets the specified parameter.
|
void |
set(java.lang.String name,
java.lang.String value,
java.lang.String charset)
Sets the specified parameter.
|
int |
size()
Returns the number of parameters in this list.
|
java.lang.String |
toString()
Returns the MIME string representation of this parameter list.
|
java.lang.String |
toString(int used)
Returns the MIME string representation of this parameter list.
|
public ParameterList()
public ParameterList(java.lang.String s) throws ParseException
s
- the parameter-list stringParseException
- if the parse failspublic void combineSegments()
2231
public int size()
public java.lang.String get(java.lang.String name)
name
- the parameter namepublic void set(java.lang.String name, java.lang.String value)
name
- the parameter namevalue
- the parameter valuepublic void set(java.lang.String name, java.lang.String value, java.lang.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(java.lang.String name)
name
- the parameter namepublic java.util.Enumeration getNames()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int used)
used
- the number of character positions already used in the
field into which the parameter list is to be inserted