The JXFS Magnetic Stripe Reader Service contains three helper classes
that facilitate data input and output:
- JxfsMSDTrackSelection extends the JxfsMSDTracks class. It is used by the
readDataAndUnformatSync method to select the tracks to be read.
Table 1. Properties
(inherited from JxfsMSDTracks)Property |
Type |
Description |
track1 |
boolean |
Indicates if track1 is selected. |
track2 |
boolean |
Indicates if track2 is selected. |
track3 |
boolean |
Indicates if track3 is selected. |
- MSDTracks provides properties and methods to get information about tracks
read or written. The readDataAndUnformatSync method (inside the MSDReadData
object), uses MSDTracks to specify which tracks need to be read and the formatAndWriteDataSync
method uses MSDTracks to specify which tracks need to be written.
Table 2. PropertiesProperty |
Type |
Description |
track1 |
boolean |
Indicates if track1 is selected. |
track2 |
boolean |
Indicates if track2 is selected. |
track3 |
boolean |
Indicates if track3 is selected. |
- MSDReadData contains the data returned by an OperationCompleteEvent event
for the readData() method operation. It is used by the readDataAndUnformatSync
method to return information about tracks read.
Table 3. PropertiesProperty |
Type |
Description |
tracksRead |
MSDTracks |
Indicates which tracks have been effectively read. |
resultReadTrack1 |
int |
Holds the error code resulting for the read operation
of its corresponding track. Should be examined after the global read error
JXFS_E_MSD_READFAILURE has been reported. It will be set with one of the read
track result codes (see below). |
resultReadTrack2 |
int |
resultReadTrack3 |
int |
Table 4. Read track return error codesResult Code |
Description |
JXFS_E_MSD_ NOTSUPPORTEDTRACK |
Track is not supported by the device. |
JXFS_E_MSD_READFAILURE |
Read error on track. |
JXFS_E_MSD_PARITY |
Parity read error. |
JXFS_E_MSD_READ_EOF |
Only SS,SE,BCC on track. |
JXFS_E_MSD_NO_STRIPE |
No magnetic stripe or flux on stripe detected (if the device has the
capability to detect this). |
JXFS_E_MSD_OTHER |
Any other type of error. |