|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.nutch.util.mime.MimeType
public final class MimeType
Defines a Mime Content Type.
| Constructor Summary | |
|---|---|
MimeType(String name)
Creates a MimeType from a String. |
|
MimeType(String primary,
String sub)
Creates a MimeType with the given primary type and sub type. |
|
| Method Summary | |
|---|---|
static String |
clean(String type)
Cleans a content-type. |
boolean |
equals(Object object)
Indicates if an object is equal to this mime-type. |
String |
getName()
Return the name of this mime-type. |
String |
getPrimaryType()
Return the primary type of this mime-type. |
String |
getSubType()
Return the sub type of this mime-type. |
int |
hashCode()
|
boolean |
hasMagic()
|
boolean |
matches(byte[] data)
|
boolean |
matches(String url)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MimeType(String name)
throws MimeTypeException
name - the MIME content type String.
MimeTypeException
public MimeType(String primary,
String sub)
throws MimeTypeException
primary - the content type primary type.sub - the content type sub type.
MimeTypeException| Method Detail |
|---|
public static final String clean(String type)
throws MimeTypeException
primary-type/sub-type.
type - is the content-type to clean.
MimeTypeException - if something wrong occurs during the
parsing/cleaning of the specified type.public String getName()
public String getPrimaryType()
public String getSubType()
public String toString()
toString in class Objectpublic boolean equals(Object object)
equals in class Objectobject - the reference object with which to compare.
true if this mime-type is equal to the object
argument; false otherwise.public int hashCode()
hashCode in class Objectpublic boolean hasMagic()
public boolean matches(String url)
public boolean matches(byte[] data)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||