Class ATR
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 Summary
Constructors -
Method Summary
Modifier 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.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
ATR
public ATR(byte[] atr) Constructs an ATR from a byte array.- Parameters:
atr- the byte array containing the answer-to-reset bytes- Throws:
NullPointerException- ifatris null
-
-
Method Details
-
getBytes
public byte[] getBytes()Returns a copy of the bytes in this ATR.- Returns:
- a copy of the bytes in this ATR.
-
getHistoricalBytes
public 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.
-
toString
-
equals
Compares 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. -
hashCode
-