THIS IS *NOT* - REPEAT *NOT* - A PUBLIC CLASS! DataFlavor IS THE PUBLIC INTERFACE, AND THIS IS PROVIDED AS A ***PRIVATE*** (THAT IS AS IN *NOT* PUBLIC) HELPER CLASS!
Modifier and Type | Field and Description |
---|---|
private transient MimeTypeParameterList | |
private transient String | |
private static final long | serialVersionUID
Use serialVersionUID from JDK 1.2 for interoperability. |
private transient String | |
private static final String | TSPECIALS
A string that holds all the special chars. |
Access | Constructor and Description |
---|---|
public | MimeType()
Constructor for externalization; this constructor should not be called
directly by an application, since the result will be an uninitialized,
immutable |
public | |
public | |
public | MimeType(String
the primary type of this primary, String MimeType the subtype of this sub, MimeTypeParameterList MimeType the requested parameter list mtpl)Builds a |
Modifier and Type | Method and Description |
---|---|
public Object | Returns: a clone of this objectOverrides java. Returns a clone of this object. |
public boolean | Returns: true if thatObject is a MimeType ;
otherwise returns false the object to be evaluated as a thatObject)MimeType Overrides java.
|
public String | |
public String | getParameter(String name)
Retrieve the value associated with the given name, or |
public MimeTypeParameterList | |
public String | |
public String | |
public int | |
private static boolean | |
private boolean | |
public boolean | Returns: true if the primary type and the subtype of this object
are the same as the specified type ; otherwise returns
false the type to compare to type)this 's typeReturns |
public boolean | Returns: true if the primary type and the subtype of this object
are the same as the content type described in rawdata ;
otherwise returns false ; if rawdata is
null , returns false the raw data to be examined rawdata)Returns |
private void | |
public void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
public void | |
public void | setParameter(String name, String value)
Set the value to be associated with the given name, replacing any previous association. |
public String | |
public void | writeExternal(ObjectOutput
the stream to write the object to out)Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings and arrays. |
parameters | back to summary |
---|---|
private transient MimeTypeParameterList parameters |
primaryType | back to summary |
---|---|
private transient String primaryType |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Use serialVersionUID from JDK 1.2 for interoperability. |
subType | back to summary |
---|---|
private transient String subType |
TSPECIALS | back to summary |
---|---|
private static final String TSPECIALS A string that holds all the special chars. |
MimeType | back to summary |
---|---|
public MimeType() Constructor for externalization; this constructor should not be called
directly by an application, since the result will be an uninitialized,
immutable |
MimeType | back to summary |
---|---|
public MimeType(String rawdata) throws MimeTypeParseException Builds a
|
MimeType | back to summary |
---|---|
public MimeType(String primary, String sub) throws MimeTypeParseException Builds a
|
MimeType | back to summary |
---|---|
public MimeType(String primary, String sub, MimeTypeParameterList mtpl) throws MimeTypeParseException Builds a
|
clone | back to summary |
---|---|
public Object clone() Overrides java. Returns a clone of this object.
|
equals | back to summary |
---|---|
public boolean equals(Object thatObject) Overrides java.
|
getBaseType | back to summary |
---|---|
public String getBaseType() Return a String representation of this object without the parameter list. |
getParameter | back to summary |
---|---|
public String getParameter(String name) Retrieve the value associated with the given name, or |
getParameters | back to summary |
---|---|
public MimeTypeParameterList getParameters() Retrieve a copy of this object's parameter list. |
getPrimaryType | back to summary |
---|---|
public String getPrimaryType() Retrieve the primary type of this object. |
getSubType | back to summary |
---|---|
public String getSubType() Retrieve the sub type of this object. |
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
|
isTokenChar | back to summary |
---|---|
private static boolean isTokenChar(char c) Determines whether or not a given character belongs to a legal token. |
isValidToken | back to summary |
---|---|
private boolean isValidToken(String s) Determines whether or not a given string is a legal token.
|
match | back to summary |
---|---|
public boolean match(MimeType type) Returns
|
match | back to summary |
---|---|
public boolean match(String rawdata) throws MimeTypeParseException Returns
|
parse | back to summary |
---|---|
private void parse(String rawdata) throws MimeTypeParseException A routine for parsing the MIME type out of a String.
|
readExternal | back to summary |
---|---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
|
removeParameter | back to summary |
---|---|
public void removeParameter(String name) Remove any value associated with the given name.
|
setParameter | back to summary |
---|---|
public void setParameter(String name, String value) Set the value to be associated with the given name, replacing any previous association.
|
toString | back to summary |
---|---|
public String toString() Overrides java. Return the String representation of this object.
|
writeExternal | back to summary |
---|---|
public void writeExternal(ObjectOutput out) throws IOException Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings and arrays.
|