Enum Class JScdProblems

java.lang.Object
java.lang.Enum<JScdProblems>
com.itemis.jscdlib.problem.JScdProblems
All Implemented Interfaces:
JScdProblem, Serializable, Comparable<JScdProblems>, Constable

public enum JScdProblems extends Enum<JScdProblems> implements JScdProblem
Problems that have been translated from C header files, e. g. gpg-error.h
  • Enum Constant Details

    • UNKNOWN_ERROR_CODE

      public static final JScdProblems UNKNOWN_ERROR_CODE
      0x8000000000000000 - An operation resulted in an error code unknown to the library.
    • IMPLEMENTATION_ERROR

      public static final JScdProblems IMPLEMENTATION_ERROR
      0x7FFFFFFFFFFFFFFF - An operation encountered an error in its implementation.
    • SCARD_S_SUCCESS

      public static final JScdProblems SCARD_S_SUCCESS
      0x0 - Success
    • SCARD_E_NO_READERS_AVAILABLE

      public static final JScdProblems SCARD_E_NO_READERS_AVAILABLE
      0x8010002E - Group contains no readers
    • SCARD_E_READER_UNAVAILABLE

      public static final JScdProblems SCARD_E_READER_UNAVAILABLE
      0x80100017 - Specified reader is not currently available for use
    • SCARD_E_NO_MEMORY

      public static final JScdProblems SCARD_E_NO_MEMORY
      0x80100006 - Not enough memory available to complete this command.
    • SCARD_F_INTERNAL_ERROR

      public static final JScdProblems SCARD_F_INTERNAL_ERROR
      0x80100014 - An internal error has been detected.
    • GPG_ERR_ASS_CONNECT_FAILED

      public static final JScdProblems GPG_ERR_ASS_CONNECT_FAILED
      0x20000103 - Connect to assuan server failed.
    • GPG_ERR_BAD_URI

      public static final JScdProblems GPG_ERR_BAD_URI
      0x2000002E - Encountered a bad URI
    • SCARD_E_INVALID_PARAMETER

      public static final JScdProblems SCARD_E_INVALID_PARAMETER
      0x80100004 - One or more of the supplied parameters could not be properly interpreted.
    • GPG_ERR_ENODEV

      public static final JScdProblems GPG_ERR_ENODEV
      0x6008050 - No device attached to the system.
    • GPG_ERR_ASS_UNKNOWN_CMD

      public static final JScdProblems GPG_ERR_ASS_UNKNOWN_CMD
      0x6000113 - Unknown IPC command
    • JSCD_GENERAL_ERROR

      public static final JScdProblems JSCD_GENERAL_ERROR
      0x90000000 - Encountered an error
  • Method Details

    • values

      public static JScdProblems[] 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 JScdProblems 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
    • errorCode

      public long errorCode()
      Specified by:
      errorCode in interface JScdProblem
      Returns:
      A unique Long that identifies this problem.
    • errorName

      public String errorName()
      Specified by:
      errorName in interface JScdProblem
      Returns:
      This problem's name.
    • description

      public String description()
      Specified by:
      description in interface JScdProblem
      Returns:
      A meaningful description that may provide users with details on the meaning of this problem.
    • fromError

      public static JScdProblem fromError(long errorCode)
      Convert an errorCode into a matching enum value.
      Parameters:
      errorCode - Code to find a matching enum value to.
      Returns:
      A matching JScdProblem instance.
      Throws:
      JScdException - if the code is unknown.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<JScdProblems>