Class encapsulating proxcard data plus the ID of the associated symbology.
This structure is used by ProxcardListener to deliver the results of successful proxcard scans to the user.
Thread safety:
Public Member Functions | |
| ProxcardData () | |
| Construct with empty proxcard contents and unknown type ID. | |
| ProxcardData (@NonNull ProxcardTypeID initTypeID, @NonNull byte[] initContents) | |
| Construct with given proxcard contents and type ID. More... | |
| byte [] | contents () |
| Retrieve the proxcard contents. More... | |
| String | contentsString () |
| Generate a string representation of the current tag contents. More... | |
| void | setContents (@NonNull byte[] newContents) |
| Set the proxcard contents. More... | |
| void | setType (@NonNull ProxcardTypeID newTypeID) |
| Set the type ID for the card. More... | |
| ProxcardTypeID | type () |
| Retrieve the type ID for the card. More... | |
| String | typeString () |
| Generate the string representation of the current type ID. More... | |
Static Public Member Functions | |
| static String | contentsString (byte[] contents) |
| Generate a string representation of a given tag's contents. More... | |
| static String | typeString (@NonNull ProxcardTypeID ID) |
| Generate the string representation of a given type ID. More... | |
| ProxcardData | ( | @NonNull ProxcardTypeID | initTypeID, |
| @NonNull byte [] | initContents | ||
| ) |
Construct with given proxcard contents and type ID.
| initTypeID | Initial value of type ID field |
| initContents | Initial value of contents field, represented as a byte array |
| byte [] contents | ( | ) |
Retrieve the proxcard contents.
| String contentsString | ( | ) |
Generate a string representation of the current tag contents.
Tag-specific formatting may be supported in future; at present, the string is simply a hex dump of the tag contents.
|
static |
Generate a string representation of a given tag's contents.
Tag-specific formatting may be supported in future; at present, the string is simply a hex dump of the tag contents.
| contents | Tag contents |
| void setContents | ( | @NonNull byte [] | newContents | ) |
Set the proxcard contents.
| newContents | New proxcard contents in byte-array format |
| void setType | ( | @NonNull ProxcardTypeID | newTypeID | ) |
Set the type ID for the card.
| newTypeID | New proxcard type ID if known and detected, or ProxcardTypeID.UNKNOWN otherwise |
| ProxcardTypeID type | ( | ) |
Retrieve the type ID for the card.
| String typeString | ( | ) |
Generate the string representation of the current type ID.
|
static |
Generate the string representation of a given type ID.
| ID | Card type for which the string representation is to be generated |