IMSEVimse 1.0
Draft

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

Field Summary
static MIMEType CONCEPTMAP
          The "application/x-conceptmap" MIME type.
static MIMEType XML
          The "text/xml" MIME type.
 
Constructor Summary
MIMEType(String ntype)
          Constructs a MIME type from the given string.
 
Method Summary
 boolean equals(Object o)
           
 String getSubType()
          Returns the subtype.
 String getType()
          Returns the main MIME type.
 int hashCode()
           
 String toString()
          Returns the MIME type in original form, e.g.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

XML

public static final MIMEType XML
The "text/xml" MIME type.

CONCEPTMAP

public static final MIMEType CONCEPTMAP
The "application/x-conceptmap" MIME type.
Constructor Detail

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.
Method Detail

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

IMSEVimse 1.0
Draft

Centre for user-oriented IT -design