org.mmbase.util
Class MimeType

java.lang.Object
  extended by org.mmbase.util.MimeType
All Implemented Interfaces:
Serializable

public class MimeType
extends Object
implements Serializable

Representation of a 'mimetype' (or Internet media type). A pair of two strings, together more or less representing the 'type' of a certain binary blob. We support also wild cards with STAR, especially when using matches(MimeType)

Since:
MMBase-1.9.3
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
static MimeType ANY
           
static MimeType OCTETSTREAM
           
static String STAR
           
static MimeType UNDETERMINED
           
 
Constructor Summary
MimeType(String s)
           
MimeType(String t, String s)
           
 
Method Summary
 boolean equals(Object o)
           
 String getSubType()
           
 String getType()
           
 int hashCode()
           
 boolean matches(MimeType mt)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STAR

public static final String STAR
See Also:
Constant Field Values

ANY

public static final MimeType ANY

OCTETSTREAM

public static final MimeType OCTETSTREAM

UNDETERMINED

public static final MimeType UNDETERMINED
Constructor Detail

MimeType

public MimeType(String s)

MimeType

public MimeType(String t,
                String s)
Method Detail

getType

public String getType()

getSubType

public String getSubType()

toString

public String toString()
Overrides:
toString in class Object

matches

public boolean matches(MimeType mt)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


MMBase 2.0-SNAPSHOT - null