APIdia Launch Partner
Top Description Fields Constructors Methods
java.awt.datatransfer

pack-priv Class MimeTypeParameterList

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.util.Enumeration, .Hashtable, .Iterator, .Map, .Set

An object that encapsulates the parameter list of a MimeType as defined in RFC 2045 and 2046.
Author
[email protected]

Field Summary

Modifier and TypeField and Description
private Hashtable<String, String>
private static final String
TSPECIALS

A string that holds all the special chars.

Constructor Summary

AccessConstructor and Description
public
MimeTypeParameterList()

Default constructor.

public

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a clone of this object
clone
()

Overrides java.lang.Object.clone.

Returns a clone of this object.

public boolean
equals(Object thatObject)

Overrides java.lang.Object.equals.

Two parameter lists are considered equal if they have exactly the same set of parameter names and associated values.

public String
get(String name)

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

public Enumeration<String>
getNames()

Retrieve an enumeration of all the names in this list.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
isEmpty()

Determine whether or not this list is empty.

private static boolean
isTokenChar(char c)

Determine whether or not a given character belongs to a legal token.

protected void
parse(String rawdata)

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

private static String
quote(String value)

A routine that knows how and when to quote and escape the given value.

public void
remove(String name)

Remove any value associated with the given name.

public void
set(String name, String value)

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

public int
size()

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

private static int
skipWhiteSpace(String rawdata, int i)

Returns the index of the first non white space character in rawdata at or after index i.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

private static String
unquote(String value)

A routine that knows how to strip the quotes and escape sequences from the given value.

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

parametersback to summary
private Hashtable<String, String> parameters
TSPECIALSback to summary
private static final String TSPECIALS

A string that holds all the special chars.

Constructor Detail

MimeTypeParameterListback to summary
public MimeTypeParameterList()

Default constructor.

MimeTypeParameterListback to summary
public MimeTypeParameterList(String rawdata) throws MimeTypeParseException

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Returns a clone of this object.

Returns:Object

a clone of this object

Annotations
@SuppressWarnings:unchecked
equalsback to summary
public boolean equals(Object thatObject)

Overrides java.lang.Object.equals.

Two parameter lists are considered equal if they have exactly the same set of parameter names and associated values. The order of the parameters is not considered.

getback to summary
public String get(String name)

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

getNamesback to summary
public Enumeration<String> getNames()

Retrieve an enumeration of all the names in this list.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
isEmptyback to summary
public boolean isEmpty()

Determine whether or not this list is empty.

isTokenCharback to summary
private static boolean isTokenChar(char c)

Determine whether or not a given character belongs to a legal token.

parseback to summary
protected void parse(String rawdata) throws MimeTypeParseException

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

quoteback to summary
private static String quote(String value)

A routine that knows how and when to quote and escape the given value.

removeback to summary
public void remove(String name)

Remove any value associated with the given name.

setback to summary
public void set(String name, String value)

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

sizeback to summary
public int size()

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

skipWhiteSpaceback to summary
private static int skipWhiteSpace(String rawdata, int i)

Returns the index of the first non white space character in rawdata at or after index i.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

unquoteback to summary
private static String unquote(String value)

A routine that knows how to strip the quotes and escape sequences from the given value.