public class ContentType
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ContentType |
FORM_URLENCODED |
static ContentType |
HTML |
static ContentType |
JSON |
static ContentType |
MULTIPART_FORM |
static ContentType |
TEXT |
| Constructor and Description |
|---|
ContentType(java.lang.String contentType) |
ContentType(java.lang.String contentType,
java.lang.String charset) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
charset()
Returns content-type charset.
|
java.lang.String |
contentType()
Returns content-type value.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isSame(java.lang.String type)
Returns
true if content-type is equals, ignoring the
charset. |
java.lang.String |
toString() |
public static final ContentType TEXT
public static final ContentType HTML
public static final ContentType JSON
public static final ContentType FORM_URLENCODED
public static final ContentType MULTIPART_FORM
public ContentType(java.lang.String contentType)
public ContentType(java.lang.String contentType,
java.lang.String charset)
public java.lang.String contentType()
public java.lang.String charset()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean isSame(java.lang.String type)
true if content-type is equals, ignoring the
charset.public int hashCode()
hashCode in class java.lang.Object