Package org.xerial.snappy
Enum SnappyErrorCode
- java.lang.Object
-
- java.lang.Enum<SnappyErrorCode>
-
- org.xerial.snappy.SnappyErrorCode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SnappyErrorCode>
public enum SnappyErrorCode extends java.lang.Enum<SnappyErrorCode>
Error codes of snappy-java
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EMPTY_INPUT
FAILED_TO_LOAD_NATIVE_LIBRARY
FAILED_TO_UNCOMPRESS
INCOMPATIBLE_VERSION
INVALID_CHUNK_SIZE
NOT_A_DIRECT_BUFFER
OUT_OF_MEMORY
PARSING_ERROR
TOO_LARGE_INPUT
UNKNOWN
UNSUPPORTED_PLATFORM
-
Field Summary
Fields Modifier and Type Field Description int
id
-
Constructor Summary
Constructors Modifier Constructor Description private
SnappyErrorCode(int id)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SnappyErrorCode
getErrorCode(int id)
static java.lang.String
getErrorMessage(int id)
static SnappyErrorCode
valueOf(java.lang.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.
-
-
-
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
-
EMPTY_INPUT
public static final SnappyErrorCode EMPTY_INPUT
-
INCOMPATIBLE_VERSION
public static final SnappyErrorCode INCOMPATIBLE_VERSION
-
INVALID_CHUNK_SIZE
public static final SnappyErrorCode INVALID_CHUNK_SIZE
-
UNSUPPORTED_PLATFORM
public static final SnappyErrorCode UNSUPPORTED_PLATFORM
-
TOO_LARGE_INPUT
public static final SnappyErrorCode TOO_LARGE_INPUT
-
-
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(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
-
getErrorCode
public static SnappyErrorCode getErrorCode(int id)
-
getErrorMessage
public static java.lang.String getErrorMessage(int id)
-
-