public interface MSRTrackData
Modifier and Type | Field and Description |
---|---|
static int |
LRC_ERROR
LRC error track error constant.
|
static int |
NO_DATA
No data track error constant.
|
static int |
NO_ERROR
No error track error constant.
|
static int |
NO_STRIPE
No stripe track error constant.
|
static int |
NON_SPECIFIC_ERROR
Non-specific error track error constant.
|
static int |
PARITY_ERROR
Parity error track error constant.
|
static int |
READ_ERROR
Read error track error constant.
|
static int |
TRACK_NO_0
Track number 0.
|
static int |
TRACK_NO_1
Track number 1.
|
static int |
TRACK_NO_2
Track number 2.
|
static int |
TRACK_NOT_SUPPORTED
Track not supported track error constant.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getTrackData(int trackNo)
Retrieves a buffer containing the raw data read from a track.
|
int |
getTrackError(int trackNo)
Indicates the nature of a track read error, if any.
|
static final int TRACK_NO_0
static final int TRACK_NO_1
static final int TRACK_NO_2
static final int NO_ERROR
This constant will be returned by getTrackError()
.
static final int NON_SPECIFIC_ERROR
This constant will be returned by getTrackError()
.
static final int TRACK_NOT_SUPPORTED
This constant will be returned by getTrackError()
.
static final int READ_ERROR
This constant will be returned by getTrackError()
.
static final int PARITY_ERROR
This constant will be returned by getTrackError()
.
static final int LRC_ERROR
This constant will be returned by getTrackError()
.
static final int NO_DATA
This constant will be returned by getTrackError()
.
static final int NO_STRIPE
This constant will be returned by getTrackError()
.
byte[] getTrackData(int trackNo)
References: ISO 7811-2 and JIS X 6302.
Track 1
Buffer content for ISO cards is as per ISO format for Track 1, with a maximum of 79 bytes, each a 6 bit alphanumeric character.
ISO Track 1 Structure B has a Start sentinel of 0x05, and an End sentinel (before LRC) of 0x1F. ISO also allow for a Structure A on Track 1 for proprietary use.
JIS Type I cards may have a Track 1 in Format A, Format B or Format C. Format A and Format B are similar to ISO Track 1 structures, with the same character set, sentinels, and maximum number of characters.
The format and content of Track 1 in Format C of the JIS I type is the same as the track format for JIS II cards. This format can be found on track 1 or track 3.
Format C (similar to JIS II) is a maximum of 72 bytes of 7 bit characters, with 0x7F for the Start and End sentinels.
Track 2
Buffer content is as per ISO and JIS Type I Card format for Track 2, with a maximum of 40 bytes, each a 4 bit numeric character, starting with 0x0B, penultimately ending in 0x0F, the last byte a LRC.
Track 3
Buffer content for ISO cards is as per ISO format for Track 3, with a maximum of 107 bytes, each a 4 bit numeric character, including the control characters, and a LRC character. Character set as per ISO track 2.
Track3 on the JIS Type I card may have the same format as the ISO track3, or alternatively may have the same format & content as found in Format C of Track 1 on a JIS Type I card (i.e. a JIS II card format).
int getTrackError(int trackNo)
NO_ERROR
,
NON_SPECIFIC_ERROR
,
TRACK_NOT_SUPPORTED
,
READ_ERROR
,
PARITY_ERROR
,
LRC_ERROR
,
NO_DATA
,
NO_STRIPE