Class ScardContext

java.lang.Object
java.lang.Number
com.sun.jna.IntegerType
de.gematik.smartcards.pcsc.lib.ScardContext
All Implemented Interfaces:
com.sun.jna.NativeMapped, Serializable

public final class ScardContext extends com.sun.jna.IntegerType
Context used by most SCard functions.

The SCARDCONTEXT type defined in pcsclite.h.in.

Note: According to the needs of NativeMappedConverter.defaultValue() the visibility of this class has to be "public".

Author:
gematik
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    ScardContext(long value)
    Comfort constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final String
    Return string representation.

    Methods inherited from class com.sun.jna.IntegerType

    compare, compare, compare, doubleValue, equals, floatValue, fromNative, hashCode, intValue, longValue, nativeType, setValue, toNative

    Methods inherited from class java.lang.Number

    byteValue, shortValue

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ScardContext

      public ScardContext()
      Default constructor.

      Constructs a handle with value 0.

      Note: According to the needs of NativeMappedConverter.defaultValue() the visibility of this class has to be "public".

    • ScardContext

      public ScardContext(long value)
      Comfort constructor.
      Parameters:
      value - used by this context, i.e. a Handle
      Throws:
      IllegalArgumentException - if value has too many bits for a Handle on this platform, e.g. Handle.SIZE is four but bit-length of value is greater than 32.
  • Method Details

    • toString

      public final String toString()
      Return string representation.
      Overrides:
      toString in class com.sun.jna.IntegerType
      Returns:
      simple name of this class concatenated with the hex-value enclosed in curly brackets, e.g. "Handle{1a2b3c4d}"
      See Also:
      • IntegerType.toString()