|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.siefkes.nlstego.util.ContentType
public final class ContentType
A simple wrapper for the MIME type and the character set of a document.
| Field Summary | |
|---|---|
static String |
KEY_MIME_TYPE
Context key recommended to store the MIME type string. |
static String |
MIME_HTML
MIME type for HTML. |
static String |
MIME_PLAIN
MIME type for plain text. |
| Method Summary | |
|---|---|
static ContentType |
determineContentType(String contentTypeHeader)
Factory method to determines the content type based an "Content-Type" header. |
String |
getCharset()
Returns the character set. |
String |
getMimeType()
Returns the MIME type. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_MIME_TYPE
public static final String MIME_HTML
public static final String MIME_PLAIN
| Method Detail |
|---|
public static ContentType determineContentType(String contentTypeHeader)
contentTypeHeader - the "Content-Type" header of an URL, as returned
by URLConnection.getContentType() (might be
null)
public String getCharset()
null if unknownpublic String getMimeType()
null if unknownpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||