Represents an Answer to Reset object(ATR). The Answer to Reset structure is
defined in ISO 7816-3. It contains two parts, protocol bytes and historical bytes.
It is assumed that Answer to Reset objects will be different for two different
families or brands of smart cards. The Answer To Reset object is used
to identify what type of card is present in the reader.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
EDC_LRC
public static final int EDC_LRC
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Constructor Detail
AnswerToReset
public AnswerToReset(byte[] atr)
Constructs an ATR object using the response from the card when an ATR
request is sent.
The first byte must be the TS byte followed by a maximum of 32 bytes.
The array must contain at least the TS byte( thus the first byte must be 0x3b or 0x3F )and the T0 byte.
This method also checks if the length of the atr is equal to TS byte + the protocol bytes + the
historical bytes + the TCK byte in the T = 1 case, or TS byte + the protocol bytes + the historical bytes or
TS byte + the protocol bytes + the historical bytes + the TCK byte in the T = 0 case.
It also checks the TCK in the T = 1 case ( It usually does not appear in the T = 0 case ).
See ISO 7816-3 on how an ATR response is constructed.
Parameters:
atr - A byte array representing the response from the card.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
True if the objects have the same protocol and historical bytes,
false otherwise.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getBaudAndClockRate
public byte getBaudAndClockRate()
Returns the TA(1) Byte of the ATR. See section 6.5.1 and 6.5.2 of ISO/IEC 7816-3:1997(E)
to determine how to calculate
Returns:
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getBWT
public int getBWT()
Returns the Block Waiting Time (BWT). The BWT is defined as the maximum delay between the leading edge
of the last character of the block received by the card and the leading edge of the first character of
the next block sent by the card.
This value is used in the T = 1 protocol.
Returns:
bwt
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getBytes
public byte[] getBytes()
Returns a copy the ATR bytes
The first byte is the TS byte followed by a maximum of 32 bytes
Returns:
a copy of the ATR bytes
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getEdcType
public int getEdcType()
Returns the EdcType. The EDC conveys the error detection code of the block used in T=1.
The two types of EDC are longitudinal redundancy check (LRC) and cyclic redundany check (CRC).
Returns:
1 for LRC and 2 for CRC.
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getHistoricalBytes
public byte[] getHistoricalBytes()
Returns the historical bytes from the raw data that is formatted as per
ISO 7816-3.
See ISO 7816-3 for specification on the meaning of
the historical bytes. This does not include the TCK byte.
Returns:
A byte array containing the historical bytes.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getIFS
public int getIFS()
Returns the maximum length of the information filed (IFS) of blocks wich cna be recieved by the card.
The default is 32, but this value can be modified by the ATR.
This value is used in the T = 1 protocol.
Returns:
ifs
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getProtocolBytes
public byte[] getProtocolBytes()
Returns the protocol bytes from the raw data that is formatted as per
ISO 7816-3. The TS byte is not included in the protocol bytes. Thus the
first protocol byte is T0.
Returns:
A byte array containing the protocol bytes.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
A String represention of the object, including the historical and
protocol bytes.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.