com.datecs.rfid

## Class RFID

- java.lang.Object
- - com.datecs.rfid.RFID

- Direct Known Subclasses:
    RC663

      public abstract class RFID
      extends java.lang.Object

  Class that represents RFID module.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CARD_SUPPORT_FELICA` FeliCa card.
    `static int` | `CARD_SUPPORT_ISO15` ISO15 card.
    `static int` | `CARD_SUPPORT_JEWEL` JEWEL card.
    `static int` | `CARD_SUPPORT_NFC` NFC card.
    `static int` | `CARD_SUPPORT_STSRI` ST SRI card.
    `static int` | `CARD_SUPPORT_TYPE_A` TYPE A card.
    `static int` | `CARD_SUPPORT_TYPE_B` TYPE B card.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close attached streams and release associated resources.
    `java.lang.String` | `getLastError()` Get last error.
    `protected abstract void` | `onDataReceived(byte[] data, int size)` Abstract method that is called when data is received.
    `static void` | `setDebug(boolean on)` Turn on/off debugging.
    `protected void` | `writeBlock(byte[] b, int offset, int length)` Writes length bytes from the specified byte array to this printer.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CARD_SUPPORT_TYPE_A

          public static final int CARD_SUPPORT_TYPE_A

      TYPE A card.
      See Also:
        Constant Field Values

    - #### CARD_SUPPORT_TYPE_B

          public static final int CARD_SUPPORT_TYPE_B

      TYPE B card.
      See Also:
        Constant Field Values

    - #### CARD_SUPPORT_FELICA

          public static final int CARD_SUPPORT_FELICA

      FeliCa card.
      See Also:
        Constant Field Values

    - #### CARD_SUPPORT_NFC

          public static final int CARD_SUPPORT_NFC

      NFC card.
      See Also:
        Constant Field Values

    - #### CARD_SUPPORT_JEWEL

          public static final int CARD_SUPPORT_JEWEL

      JEWEL card.
      See Also:
        Constant Field Values

    - #### CARD_SUPPORT_ISO15

          public static final int CARD_SUPPORT_ISO15

      ISO15 card.
      See Also:
        Constant Field Values

    - #### CARD_SUPPORT_STSRI

          public static final int CARD_SUPPORT_STSRI

      ST SRI card.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setDebug

          public static void setDebug(boolean on)

      Turn on/off debugging.
      Parameters:
        `on` - the debugging state.

    - #### onDataReceived

          protected abstract void onDataReceived(byte[] data,
                                                 int size)

      Abstract method that is called when data is received.
      Parameters:
        `data` - data buffer.
        `size` - data size.

    - #### writeBlock

          protected void writeBlock(byte[] b,
                                    int offset,
                                    int length)
                             throws java.io.IOException

      Writes length bytes from the specified byte array to this printer.
      Parameters:
        `b` - byte array.
        `offset` - data offset.
        `length` - data length.
      Throws:
        `java.io.IOException` - if an I/O error occurs.

    - #### getLastError

          public java.lang.String getLastError()

      Get last error.
      Returns:
        last error.

    - #### close

          public void close()

      Close attached streams and release associated resources.