Enum Class SkinProblem

java.lang.Object
java.lang.Enum<SkinProblem>
lol.trq.alts.account.SkinProblem
All Implemented Interfaces:
Serializable, Comparable<SkinProblem>, Constable

public enum SkinProblem extends Enum<SkinProblem>
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
  • Enum Constant Details

    • UNREADABLE

      public static final SkinProblem UNREADABLE
      The file could not be read: missing, a directory, or not readable.
      Since:
      1.0.0
    • EMPTY

      public static final SkinProblem EMPTY
      There were no bytes to upload.
      Since:
      1.0.0
    • TOO_LARGE

      public static final SkinProblem TOO_LARGE
      The data is larger than SkinService.MAX_SKIN_BYTES.
      Since:
      1.0.0
    • NOT_PNG

      public static final SkinProblem NOT_PNG
      The data does not begin as a PNG, or its header is truncated.
      Since:
      1.0.0
    • WRONG_DIMENSIONS

      public static final SkinProblem 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

      public static SkinProblem[] 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

      public static SkinProblem valueOf(String name)
      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 name
      NullPointerException - if the argument is null