java.lang.Object
javax.smartcardio.ATR
- All Implemented Interfaces:
- Serializable
A Smart Card's answer-to-reset bytes. A Card's ATR object can be obtained
 by calling Card.getATR().
 This class does not attempt to verify that the ATR encodes a semantically
 valid structure.
 
Instances of this class are immutable. Where data is passed in or out via byte arrays, defensive cloning is performed.
- Since:
- 1.6
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCompares the specified object with this ATR for equality.byte[]getBytes()Returns a copy of the bytes in this ATR.byte[]Returns a copy of the historical bytes in this ATR.inthashCode()Returns the hash code value for this ATR.toString()Returns a string representation of this ATR.
- 
Constructor Details- 
ATRpublic ATR(byte[] atr) Constructs an ATR from a byte array.- Parameters:
- atr- the byte array containing the answer-to-reset bytes
- Throws:
- NullPointerException- if- atris null
 
 
- 
- 
Method Details- 
getBytespublic byte[] getBytes()Returns a copy of the bytes in this ATR.- Returns:
- a copy of the bytes in this ATR.
 
- 
getHistoricalBytespublic byte[] getHistoricalBytes()Returns a copy of the historical bytes in this ATR. If this ATR does not contain historical bytes, an array of length zero is returned.- Returns:
- a copy of the historical bytes in this ATR.
 
- 
toStringReturns a string representation of this ATR.
- 
equalsCompares the specified object with this ATR for equality. Returns true if the given object is also an ATR and its bytes are identical to the bytes in this ATR.
- 
hashCodepublic int hashCode()Returns the hash code value for this ATR.
 
-