Enum Class SkinProblem
- All Implemented Interfaces:
Serializable, Comparable<SkinProblem>, Constable
Why a skin file is refused before anything is sent: the one place where a host needs a finer reason
than
AltsFailure.Kind.INVALID_INPUT to tell the user what to fix.
SkinService.validate(byte[]) returns one without sending anything; an upload that fails
the same check fails with an AltsException of kind
AltsFailure.Kind.INVALID_INPUT. Branch on this, never on the message.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThere were no bytes to upload.The data does not begin as a PNG, or its header is truncated.The data is larger thanSkinService.MAX_SKIN_BYTES.The file could not be read: missing, a directory, or not readable.The image is a PNG but not 64x64 or 64x32, the two canvases a skin can have. -
Method Summary
Modifier and TypeMethodDescriptionstatic SkinProblemReturns the enum constant of this class with the specified name.static SkinProblem[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNREADABLE
The file could not be read: missing, a directory, or not readable.- Since:
- 1.0.0
-
EMPTY
-
TOO_LARGE
The data is larger thanSkinService.MAX_SKIN_BYTES.- Since:
- 1.0.0
-
NOT_PNG
The data does not begin as a PNG, or its header is truncated.- Since:
- 1.0.0
-
WRONG_DIMENSIONS
The image is a PNG but not 64x64 or 64x32, the two canvases a skin can have.- Since:
- 1.0.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-