Class Overview
A Smart Card's answer-to-reset bytes. A Card's ATR object can be obtained
by calling 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.
Summary
Public Constructors |
|
ATR(byte[] atr)
Constructs an ATR from a byte array.
|
Public Methods |
boolean
|
equals(Object obj)
Compares the specified object with this ATR for equality.
|
byte[]
|
getBytes()
Returns a copy of the bytes in this ATR.
|
byte[]
|
getHistoricalBytes()
Returns a copy of the historical bytes in this ATR.
|
int
|
hashCode()
Returns the hash code value for this ATR.
|
String
|
toString()
Returns a string representation of this ATR.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
public
ATR
(byte[] atr)
Constructs an ATR from a byte array.
Parameters
atr
| the byte array containing the answer-to-reset bytes |
Public Methods
public
boolean
equals
(Object obj)
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.
Parameters
obj
| the object to be compared for equality with this ATR |
Returns
- true if the specified object is equal to this ATR
public
byte[]
getBytes
()
Returns a copy of the bytes in this ATR.
Returns
- a copy of the bytes in this ATR.
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.
public
int
hashCode
()
Returns the hash code value for this ATR.
Returns
- the hash code value for this ATR.
public
String
toString
()
Returns a string representation of this ATR.
Returns
- a String representation of this ATR.