API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.activation. MimeType View Source
Author(s)
Since
1.6
Version
Serial
Hierarchy
 Object
      MimeType
Implements
 Externalizable
Subclasses
Description
public class MimeType
  A Multipurpose Internet Mail Extension (MIME) type, as defined in RFC 2045 and 2046.
See also:   
Constructors
public MimeType ()
Default constructor.
public MimeType (String rawdata) throws MimeTypeParseException
  Constructor that builds a MimeType from a String.
public MimeType (String primary, String sub) throws MimeTypeParseException
  Constructor that builds a MimeType with the given primary and sub type but has an empty parameter list.
Methods
Hide/Show inherited methods
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 this object's parameter list.
public String getPrimaryType ()
  Retrieve the primary type of this object.
public String getSubType ()
  Retrieve the subtype of this object.
public boolean match (MimeType type)
  Determine if the primary and sub type of this object is the same as what is in the given type.
public boolean match (String rawdata) throws MimeTypeParseException
  Determine if the primary and sub type of this object is the same as the content type described in rawdata.
public void readExternal (ObjectInput in) throws IOException ClassNotFoundException [Specified in Externalizable]
  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 void setPrimaryType (String primary) throws MimeTypeParseException
  Set the primary type for this object to the given String.
public void setSubType (String sub) throws MimeTypeParseException
  Set the subtype for this object to the given String.
public String toString ()
Return the String representation of this object.
public void writeExternal (ObjectOutput out) throws IOException [Specified in Externalizable]
  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.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar