Class encapsulating magnetic stripe data tracks.
This structure is used by MagstripeListener to deliver the results of magstripe card scans to the user.
Track data may be read in 5-bit or 7-bit formats. These will be decoded according to standard magstripe encoding rules, and each track's embedded checksum will be verified. If verification succeeds, then track data is converted to UTF-16 format so that it may be accessed using the String type.
Thread safety:
- Concurrent accesses to distinct objects: safe
- Concurrent accesses to same object: unsafe, unless all accesses are read-only (i.e. query functions)
|
| MagstripeData () |
| Default construction - sets each track to an empty string.
|
|
| MagstripeData (@NonNull String initTrack1, @NonNull String initTrack2, @NonNull String initTrack3) |
| Construction - sets formatted track data. More...
|
|
void | setTrack1 (@NonNull String newTrack) |
| Set the contents of the first track. More...
|
|
void | setTrack2 (@NonNull String newTrack) |
| Set the contents of the second track. More...
|
|
void | setTrack3 (@NonNull String newTrack) |
| Set the contents of the third track. More...
|
|
String | track1 () |
| Query the contents of the first track. More...
|
|
String | track2 () |
| Query the contents of the second track. More...
|
|
String | track3 () |
| Query the contents of the third track. More...
|
|