Package org.jmrtd
Interface APDULevelReadBinaryCapable
-
- All Known Implementing Classes:
ReadBinaryAPDUSender
public interface APDULevelReadBinaryCapable
The low-level capability for reading files usingSELECT
andREAD BINARY
(both SFI and non-SFI) commands. The actual file system on an ICAO compliant chip supports this.- Since:
- 0.7.0
- Version:
- $Revision: 1781 $
- Author:
- The JMRTD team (info@jmrtd,org)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
sendReadBinary(net.sf.scuba.smartcards.APDUWrapper wrapper, int sfi, int offset, int le, boolean isSFIEnabled, boolean isTLVEncodedOffsetNeeded)
Sends aREAD BINARY
command to the passport.void
sendSelectApplet(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] aid)
Sends aSELECT APPLET
command to the card.void
sendSelectFile(net.sf.scuba.smartcards.APDUWrapper wrapper, short fid)
Selects a file by file identifier.
-
-
-
Method Detail
-
sendSelectApplet
void sendSelectApplet(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] aid) throws net.sf.scuba.smartcards.CardServiceException
Sends aSELECT APPLET
command to the card.- Parameters:
wrapper
- the secure messaging wrapper to useaid
- the applet to select- Throws:
net.sf.scuba.smartcards.CardServiceException
- on tranceive error
-
sendSelectFile
void sendSelectFile(net.sf.scuba.smartcards.APDUWrapper wrapper, short fid) throws net.sf.scuba.smartcards.CardServiceException
Selects a file by file identifier.- Parameters:
wrapper
- the APDU wrapper to usefid
- the file identifier- Throws:
net.sf.scuba.smartcards.CardServiceException
- on error
-
sendReadBinary
byte[] sendReadBinary(net.sf.scuba.smartcards.APDUWrapper wrapper, int sfi, int offset, int le, boolean isSFIEnabled, boolean isTLVEncodedOffsetNeeded) throws net.sf.scuba.smartcards.CardServiceException
Sends aREAD BINARY
command to the passport. Secure messaging will be applied to the command and response APDU.- Parameters:
wrapper
- the secure messaging wrapper to use, ornull
for nonesfi
- the short file identifier byte of the file to read as an int value (between 0 and 255) only ifisSFIEnabled
istrue
, if not any value)offset
- offset into the file (either a value between 0 and 255 ifisSFIEnabled
holds, or a value between 0 and 65535 if not)le
- the expected length of the file to readisSFIEnabled
- a boolean indicating whether short file identifiers are usedisTLVEncodedOffsetNeeded
- a boolean indicating whether it should be a long (INS == 0xB1
) read- Returns:
- a byte array of length at most
le
with (the specified part of) the contents of the currently selected file - Throws:
net.sf.scuba.smartcards.CardServiceException
- if the command was not successful
-
-