Package pl.droidsonroids.gif
Enum GifError
- All Implemented Interfaces:
Serializable,Comparable<GifError>
public enum GifError extends Enum<GifError>
Encapsulation of decoding errors occurring in native code.
Three digit codes are equal to GIFLib error codes.
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSE_FAILEDFailed to close given input.DATA_TOO_BIGNumber of pixels bigger than width * height.EOF_TOO_SOONImage EOF detected before image complete.IMAGE_DEFECTImage is defective, decoding aborted.IMG_NOT_CONFINEDImage size exceeds screen size.INVALID_BYTE_BUFFERInvalid and/or indirect byte buffer specified.INVALID_IMG_DIMSDeprecated.This error is no longer thrown.INVALID_SCR_DIMSInvalid screen size, dimensions must be positive.NO_COLOR_MAPNeither global nor local color map found.NO_ERRORSpecial value indicating lack of errors.NO_FRAMESNo frames found, at least one frame required.NO_IMAG_DSCRNo image descriptor detected.NO_SCRN_DSCRNo screen descriptor detected.NOT_ENOUGH_MEMFailed to allocate required memory.NOT_GIF_FILEData is not in GIF format.NOT_READABLEGiven file was not opened for read.OPEN_FAILEDFailed to open given input.READ_FAILEDFailed to read from given input.REWIND_FAILEDInput source rewind has failed, animation is stopped.UNKNOWNUnknown error, should never appearWRONG_RECORDWrong record type detected. -
Field Summary
Fields Modifier and Type Field Description StringdescriptionHuman readable description of the error. -
Method Summary
-
Enum Constant Details
-
NO_ERROR
Special value indicating lack of errors. -
OPEN_FAILED
Failed to open given input. -
READ_FAILED
Failed to read from given input. -
NOT_GIF_FILE
Data is not in GIF format. -
NO_SCRN_DSCR
No screen descriptor detected. -
NO_IMAG_DSCR
No image descriptor detected. -
NO_COLOR_MAP
Neither global nor local color map found. -
WRONG_RECORD
Wrong record type detected. -
DATA_TOO_BIG
Number of pixels bigger than width * height. -
NOT_ENOUGH_MEM
Failed to allocate required memory. -
CLOSE_FAILED
Failed to close given input. -
NOT_READABLE
Given file was not opened for read. -
IMAGE_DEFECT
Image is defective, decoding aborted. -
EOF_TOO_SOON
Image EOF detected before image complete. EOF means GIF terminator, not the end of input source. -
NO_FRAMES
No frames found, at least one frame required. -
INVALID_SCR_DIMS
Invalid screen size, dimensions must be positive. -
INVALID_IMG_DIMS
Deprecated.This error is no longer thrown.Invalid image size, dimensions must be positive. -
IMG_NOT_CONFINED
Image size exceeds screen size. Occurs only if input source changes after opening. Otherwise canvas is extended. -
REWIND_FAILED
Input source rewind has failed, animation is stopped. -
INVALID_BYTE_BUFFER
Invalid and/or indirect byte buffer specified. -
UNKNOWN
Unknown error, should never appear
-
-
Field Details
-
description
Human readable description of the error.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException- if the argument is null
-
getErrorCode
public int getErrorCode()- Returns:
- error code
-