org.xerial.snappy
Enum SnappyErrorCode

java.lang.Object
  extended by java.lang.Enum<SnappyErrorCode>
      extended by org.xerial.snappy.SnappyErrorCode
All Implemented Interfaces:
Serializable, Comparable<SnappyErrorCode>

public enum SnappyErrorCode
extends Enum<SnappyErrorCode>

Error codes of snappy-java

Author:
leo

Enum Constant Summary
FAILED_TO_LOAD_NATIVE_LIBRARY
           
FAILED_TO_UNCOMPRESS
           
NOT_A_DIRECT_BUFFER
           
OUT_OF_MEMORY
           
PARSING_ERROR
           
UNKNOWN
           
 
Field Summary
 int id
           
 
Method Summary
static SnappyErrorCode getErrorCode(int id)
           
static String getErrorMessage(int id)
           
static SnappyErrorCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SnappyErrorCode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final SnappyErrorCode UNKNOWN

FAILED_TO_LOAD_NATIVE_LIBRARY

public static final SnappyErrorCode FAILED_TO_LOAD_NATIVE_LIBRARY

PARSING_ERROR

public static final SnappyErrorCode PARSING_ERROR

NOT_A_DIRECT_BUFFER

public static final SnappyErrorCode NOT_A_DIRECT_BUFFER

OUT_OF_MEMORY

public static final SnappyErrorCode OUT_OF_MEMORY

FAILED_TO_UNCOMPRESS

public static final SnappyErrorCode FAILED_TO_UNCOMPRESS
Field Detail

id

public final int id
Method Detail

values

public static SnappyErrorCode[] 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 (SnappyErrorCode c : SnappyErrorCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SnappyErrorCode 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
NullPointerException - if the argument is null

getErrorCode

public static SnappyErrorCode getErrorCode(int id)

getErrorMessage

public static String getErrorMessage(int id)


Copyright © 2011 xerial.org. All Rights Reserved.