| java.lang.Object java.awt.datatransfer.MimeType
MimeType | class MimeType implements Externalizable,Cloneable(Code) | | A Multipurpose Internet Mail Extension (MIME) type, as defined
in RFC 2045 and 2046.
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!
|
Constructor Summary | |
public | MimeType() Constructor for externalization. | public | MimeType(String rawdata) Constructor that builds a MimeType from a String. | public | MimeType(String primary, String sub) Constructor that builds a MimeType with the given primary and sub
type
but has an empty parameter list. | public | MimeType(String primary, String sub, MimeTypeParameterList mtpl) Constructor used to initialize MimeType, with a pre-defined
and valid (or empty) parameter list. |
Method Summary | |
public Object | clone() | public boolean | equals(Object thatObject) MimeTypes are equals if their primary types, subtypes, and
parameters are all equal. | public String | getBaseType() Return a String representation of this object
without the parameter list. | public String | getParameter(String name) Retrieve the value associated with the given name, or null if there
is no current association. | public MimeTypeParameterList | getParameters() Retrieve a copy of this object's parameter list. | public String | getPrimaryType() Retrieve the primary type of this object. | public String | getSubType() Retrieve the sub type of this object. | public int | hashCode() | public boolean | match(MimeType type) Determine of the primary and sub type of this object is
the same as the what is in the given type. | public boolean | match(String rawdata) Determine of the primary and sub type of this object is
the same as the content type described in rawdata. | public void | readExternal(ObjectInput in) 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 | removeParameter(String name) Remove any value associated with the given name. | public void | setParameter(String name, String value) Set the value to be associated with the given name, replacing
any previous association. | public String | toString() Return the String representation of this object. | public void | writeExternal(ObjectOutput out) 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. |
serialVersionUID | final static long serialVersionUID(Code) | | |
MimeType | public MimeType()(Code) | | Constructor for externalization. This constructor should not be
called directly by an application, since the result will be an
uninitialized, immutable MimeType object.
|
equals | public boolean equals(Object thatObject)(Code) | | MimeTypes are equals if their primary types, subtypes, and
parameters are all equal. No default values are taken into
account.
|
getBaseType | public String getBaseType()(Code) | | Return a String representation of this object
without the parameter list.
|
getParameter | public String getParameter(String name)(Code) | | Retrieve the value associated with the given name, or null if there
is no current association.
|
getPrimaryType | public String getPrimaryType()(Code) | | Retrieve the primary type of this object.
|
getSubType | public String getSubType()(Code) | | Retrieve the sub type of this object.
|
hashCode | public int hashCode()(Code) | | |
match | public boolean match(MimeType type)(Code) | | Determine of the primary and sub type of this object is
the same as the what is in the given type.
|
match | public boolean match(String rawdata) throws MimeTypeParseException(Code) | | Determine of the primary and sub type of this object is
the same as the content type described in rawdata.
|
readExternal | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code) | | 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.
exception: ClassNotFoundException - If the class for an object beingrestored cannot be found. |
removeParameter | public void removeParameter(String name)(Code) | | Remove any value associated with the given name.
|
setParameter | public void setParameter(String name, String value)(Code) | | Set the value to be associated with the given name, replacing
any previous association.
|
toString | public String toString()(Code) | | Return the String representation of this object.
|
writeExternal | public void writeExternal(ObjectOutput out) throws IOException(Code) | | 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.
exception: IOException - Includes any I/O exceptions that may occur |
|
|