public class

MimeTypeParameterList

extends Object
java.lang.Object
   ↳ com.google.code.javax.activation.MimeTypeParameterList

Class Overview

A parameter list of a MimeType as defined in RFC 2045 and 2046. The Primary type of the object must already be stripped off.

See Also
  • javax.activation.MimeType

Summary

Constants
String TSPECIALS A string that holds all the special chars.
Fields
private Hashtable parameters
Public Constructors
MimeTypeParameterList()
Default constructor.
MimeTypeParameterList(String parameterList)
Constructs a new MimeTypeParameterList with the passed in data.
Public Methods
String get(String name)
Retrieve the value associated with the given name, or null if there is no current association.
Enumeration getNames()
Retrieve an enumeration of all the names in this list.
boolean isEmpty()
Determine whether or not this list is empty.
void remove(String name)
Remove any value associated with the given name.
void set(String name, String value)
Set the value to be associated with the given name, replacing any previous association.
int size()
Return the number of name-value pairs in this list.
String toString()
Return a string representation of this object.
Protected Methods
void parse(String parameterList)
A routine for parsing the parameter list out of a String.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

private static final String TSPECIALS

A string that holds all the special chars.

Constant Value: "()<>@,;:/[]?=\""

Fields

private Hashtable parameters

Public Constructors

public MimeTypeParameterList ()

Default constructor.

public MimeTypeParameterList (String parameterList)

Constructs a new MimeTypeParameterList with the passed in data.

Parameters
parameterList An RFC 2045, 2046 compliant parameter list.

Public Methods

public String get (String name)

Retrieve the value associated with the given name, or null if there is no current association.

Parameters
name The parameter name
Returns
  • the parameter's value

public Enumeration getNames ()

Retrieve an enumeration of all the names in this list.

Returns
  • an enumeration of all parameter names

public boolean isEmpty ()

Determine whether or not this list is empty.

Returns
  • true if there are no parameters

public void remove (String name)

Remove any value associated with the given name.

Parameters
name The parameter name

public void set (String name, String value)

Set the value to be associated with the given name, replacing any previous association.

Parameters
name The parameter name
value The parameter's value

public int size ()

Return the number of name-value pairs in this list.

Returns
  • the number of parameters

public String toString ()

Return a string representation of this object.

Protected Methods

protected void parse (String parameterList)

A routine for parsing the parameter list out of a String.

Parameters
parameterList An RFC 2045, 2046 compliant parameter list.