Package org.eclipse.jetty.http
Enum MimeTypes.Type
- java.lang.Object
-
- java.lang.Enum<MimeTypes.Type>
-
- org.eclipse.jetty.http.MimeTypes.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MimeTypes.Type>
- Enclosing class:
- MimeTypes
public static enum MimeTypes.Type extends java.lang.Enum<MimeTypes.Type>
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private boolean
_assumedCharset
private MimeTypes.Type
_base
private java.nio.ByteBuffer
_buffer
private java.nio.charset.Charset
_charset
private java.lang.String
_charsetString
private HttpField
_field
private java.lang.String
_string
-
Constructor Summary
Constructors Modifier Constructor Description private
Type(java.lang.String s)
private
Type(java.lang.String s, java.nio.charset.Charset cs)
private
Type(java.lang.String s, MimeTypes.Type base)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
asBuffer()
java.lang.String
asString()
MimeTypes.Type
getBaseType()
java.nio.charset.Charset
getCharset()
java.lang.String
getCharsetString()
HttpField
getContentTypeField()
boolean
is(java.lang.String s)
boolean
isCharsetAssumed()
java.lang.String
toString()
static MimeTypes.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MimeTypes.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FORM_ENCODED
public static final MimeTypes.Type FORM_ENCODED
-
MESSAGE_HTTP
public static final MimeTypes.Type MESSAGE_HTTP
-
MULTIPART_BYTERANGES
public static final MimeTypes.Type MULTIPART_BYTERANGES
-
MULTIPART_FORM_DATA
public static final MimeTypes.Type MULTIPART_FORM_DATA
-
TEXT_HTML
public static final MimeTypes.Type TEXT_HTML
-
TEXT_PLAIN
public static final MimeTypes.Type TEXT_PLAIN
-
TEXT_XML
public static final MimeTypes.Type TEXT_XML
-
TEXT_JSON
public static final MimeTypes.Type TEXT_JSON
-
APPLICATION_JSON
public static final MimeTypes.Type APPLICATION_JSON
-
TEXT_HTML_8859_1
public static final MimeTypes.Type TEXT_HTML_8859_1
-
TEXT_HTML_UTF_8
public static final MimeTypes.Type TEXT_HTML_UTF_8
-
TEXT_PLAIN_8859_1
public static final MimeTypes.Type TEXT_PLAIN_8859_1
-
TEXT_PLAIN_UTF_8
public static final MimeTypes.Type TEXT_PLAIN_UTF_8
-
TEXT_XML_8859_1
public static final MimeTypes.Type TEXT_XML_8859_1
-
TEXT_XML_UTF_8
public static final MimeTypes.Type TEXT_XML_UTF_8
-
TEXT_JSON_8859_1
public static final MimeTypes.Type TEXT_JSON_8859_1
-
TEXT_JSON_UTF_8
public static final MimeTypes.Type TEXT_JSON_UTF_8
-
APPLICATION_JSON_8859_1
public static final MimeTypes.Type APPLICATION_JSON_8859_1
-
APPLICATION_JSON_UTF_8
public static final MimeTypes.Type APPLICATION_JSON_UTF_8
-
-
Field Detail
-
_string
private final java.lang.String _string
-
_base
private final MimeTypes.Type _base
-
_buffer
private final java.nio.ByteBuffer _buffer
-
_charset
private final java.nio.charset.Charset _charset
-
_charsetString
private final java.lang.String _charsetString
-
_assumedCharset
private final boolean _assumedCharset
-
_field
private final HttpField _field
-
-
Constructor Detail
-
Type
private Type(java.lang.String s)
-
Type
private Type(java.lang.String s, MimeTypes.Type base)
-
Type
private Type(java.lang.String s, java.nio.charset.Charset cs)
-
-
Method Detail
-
values
public static MimeTypes.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MimeTypes.Type c : MimeTypes.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MimeTypes.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
asBuffer
public java.nio.ByteBuffer asBuffer()
-
getCharset
public java.nio.charset.Charset getCharset()
-
getCharsetString
public java.lang.String getCharsetString()
-
is
public boolean is(java.lang.String s)
-
asString
public java.lang.String asString()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<MimeTypes.Type>
-
isCharsetAssumed
public boolean isCharsetAssumed()
-
getContentTypeField
public HttpField getContentTypeField()
-
getBaseType
public MimeTypes.Type getBaseType()
-
-