Home » openjdk-7 » java » awt » datatransfer » [javadoc | source]
java.awt.datatransfer
class: MimeType [javadoc | source]
java.lang.Object
   java.awt.datatransfer.MimeType

All Implemented Interfaces:
    Cloneable, Externalizable

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!
Field Summary
static final  long serialVersionUID     
Constructor:
 public MimeType() 
 public MimeType(String rawdata) throws MimeTypeParseException 
    Builds a MimeType from a String.
    Parameters:
    rawdata - text used to initialize the MimeType
    Throws:
    NullPointerException - if rawdata is null
 public MimeType(String primary,
    String sub) throws MimeTypeParseException 
    Builds a MimeType with the given primary and sub type but has an empty parameter list.
    Parameters:
    primary - the primary type of this MimeType
    sub - the subtype of this MimeType
    Throws:
    NullPointerException - if either primary or sub is null
 public MimeType(String primary,
    String sub,
    MimeTypeParameterList mtpl) throws MimeTypeParseException 
    Builds a MimeType with a pre-defined and valid (or empty) parameter list.
    Parameters:
    primary - the primary type of this MimeType
    sub - the subtype of this MimeType
    mtpl - the requested parameter list
    Throws:
    NullPointerException - if either primary, sub or mtpl is null
Method from java.awt.datatransfer.MimeType Summary:
clone,   equals,   getBaseType,   getParameter,   getParameters,   getPrimaryType,   getSubType,   hashCode,   match,   match,   readExternal,   removeParameter,   setParameter,   toString,   writeExternal
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.datatransfer.MimeType Detail:
 public Object clone() 
    Returns a clone of this object.
 public boolean equals(Object thatObject) 
    MimeTypes are equal if their primary types, subtypes, and parameters are all equal. No default values are taken into account.
 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) 
    Returns true if the primary type and the subtype of this object are the same as the specified type; otherwise returns false.
 public boolean match(String rawdata) throws MimeTypeParseException 
    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.
 public  void readExternal(ObjectInput in) throws IOException, ClassNotFoundException 
    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.
 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) throws IOException 
    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.