nextapp.echo2.webrender
Class ContentType
java.lang.Object
nextapp.echo2.webrender.ContentType
- All Implemented Interfaces:
- java.io.Serializable
public class ContentType
- extends java.lang.Object
- implements java.io.Serializable
A representation of a content-type.
This object contains a MIME-type and a flag indicating whether the
content-type is used exclusively for binary data (i.e., indicating whether
a character encoding needs to be specified).
- See Also:
- Serialized Form
|
Constructor Summary |
ContentType(java.lang.String mimeType,
boolean binary)
Creates a new content type. |
|
Method Summary |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getMimeType()
Returns the MIME type. |
boolean |
isBinary()
Determines if the content type is used exclusively for binary
data, i.e., it does not require any character encoding |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IMAGE_GIF
public static final ContentType IMAGE_GIF
IMAGE_PNG
public static final ContentType IMAGE_PNG
IMAGE_JPEG
public static final ContentType IMAGE_JPEG
MULTIPART_FORM_DATA
public static final ContentType MULTIPART_FORM_DATA
TEXT_HTML
public static final ContentType TEXT_HTML
TEXT_JAVASCRIPT
public static final ContentType TEXT_JAVASCRIPT
TEXT_PLAIN
public static final ContentType TEXT_PLAIN
TEXT_XML
public static final ContentType TEXT_XML
ContentType
public ContentType(java.lang.String mimeType,
boolean binary)
- Creates a new content type.
- Parameters:
mimeType - The MIME type of the content type.binary - True if the content type is used exclusively for binary
data, i.e., it does not require any character encoding
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
- See Also:
Object.equals(Object)
getMimeType
public java.lang.String getMimeType()
- Returns the MIME type.
- Returns:
- The MIME type.
isBinary
public boolean isBinary()
- Determines if the content type is used exclusively for binary
data, i.e., it does not require any character encoding
- Returns:
- true if the content type is binary
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()