org.apache.hadoop.hbase.rest
Enum GenericHandler.ContentType
java.lang.Object
java.lang.Enum<GenericHandler.ContentType>
org.apache.hadoop.hbase.rest.GenericHandler.ContentType
- All Implemented Interfaces:
- Serializable, Comparable<GenericHandler.ContentType>
- Enclosing class:
- GenericHandler
protected static enum GenericHandler.ContentType
- extends Enum<GenericHandler.ContentType>
XML
public static final GenericHandler.ContentType XML
PLAIN
public static final GenericHandler.ContentType PLAIN
MIME
public static final GenericHandler.ContentType MIME
NOT_ACCEPTABLE
public static final GenericHandler.ContentType NOT_ACCEPTABLE
values
public static final GenericHandler.ContentType[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(GenericHandler.ContentType c : GenericHandler.ContentType.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static GenericHandler.ContentType valueOf(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:
IllegalArgumentException
- if this enum type has no constant
with the specified name
toString
public String toString()
- Overrides:
toString
in class Enum<GenericHandler.ContentType>
getContentType
public static GenericHandler.ContentType getContentType(String t)
- Utility method used looking at Accept header content.
- Parameters:
t
- The content type to examine.
- Returns:
- The enum that matches the prefix of
t
or
the default enum if t
is empty. If unsupported type, we
return NOT_ACCEPTABLE.
Copyright © 2006 The Apache Software Foundation