org.apache.hadoop.hbase.rest
Enum GenericHandler.ContentType

java.lang.Object
  extended by java.lang.Enum<GenericHandler.ContentType>
      extended by 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>


Enum Constant Summary
MIME
           
NOT_ACCEPTABLE
           
PLAIN
           
XML
           
 
Method Summary
static GenericHandler.ContentType getContentType(String t)
          Utility method used looking at Accept header content.
 String toString()
           
static GenericHandler.ContentType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GenericHandler.ContentType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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
Method Detail

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