se.kth.cid.util
Class MIMEType
java.lang.Object
|
+--se.kth.cid.util.MIMEType
- public class MIMEType
- extends Object
Represents a MIME type.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- Mikael Nilsson
Constructor Summary |
MIMEType(String ntype)
Constructs a MIME type from the given string. |
XML
public static final MIMEType XML
- The "text/xml" MIME type.
CONCEPTMAP
public static final MIMEType CONCEPTMAP
- The "application/x-conceptmap" MIME type.
MIMEType
public MIMEType(String ntype)
throws MalformedMIMETypeException
- Constructs a MIME type from the given string.
The String should be in the form "image/jpeg" etc.
- Parameters:
ntype
- the String to parse.- Throws:
MalformedMIMETypeException
- if parsing the string was
impossible.
getType
public String getType()
- Returns the main MIME type.
- Returns:
- the main MIME type.
getSubType
public String getSubType()
- Returns the subtype.
- Returns:
- the subtype.
toString
public String toString()
- Returns the MIME type in original form, e.g. "image/jpeg".
- Overrides:
toString
in class Object
- Returns:
- the MIME type in original form.
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Centre for user-oriented IT -design