public class Slot
extends java.lang.Object
Token token = slot.getToken();
// to ensure that there is a token present in the slot
if (token != null) {
// ... work with the token
}
Modifier and Type | Field and Description |
---|---|
protected Module |
module_
The module that created this slot object.
|
protected long |
slotID_
The identifier of the slot.
|
protected Token |
token
The token in this slot, if the token is not removable.
|
protected boolean |
useUtf8Encoding_
True, if UTF8 encoding is used as character encoding for character array attributes and PINs.
|
Modifier | Constructor and Description |
---|---|
protected |
Slot(Module module,
long slotID)
The constructor that takes a reference to the module and the slot ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object otherObject)
Compares the slot ID and the module_ of this object with the slot ID and module_ of the other
object.
|
Module |
getModule()
Get the module that created this Slot object.
|
long |
getSlotID()
Get the ID of this slot.
|
SlotInfo |
getSlotInfo()
Get information about this slot object.
|
Token |
getToken()
Get an object for handling the token that is currently present in this slot, or null, if there
is no token present.
|
int |
hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a
hashtable.
|
boolean |
isSetUtf8Encoding()
Returns whether UTF8 encoding is set.
|
void |
setUtf8Encoding(boolean useUtf8Encoding)
Specify, whether UTF8 character encoding shall be used for character array attributes and PINs.
|
java.lang.String |
toString()
Returns the string representation of this object.
|
protected Module module_
protected long slotID_
protected boolean useUtf8Encoding_
protected Token token
protected Slot(Module module, long slotID)
module
- The reference to the module of this slot.slotID
- The identifier of the slot.public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
otherObject
- The other Slot object.public void setUtf8Encoding(boolean useUtf8Encoding)
useUtf8Encoding
- true, if UTF8 shall be usedpublic boolean isSetUtf8Encoding()
public Module getModule()
public long getSlotID()
public SlotInfo getSlotInfo() throws TokenException
TokenException
- If reading the information fails.public Token getToken() throws TokenException
TokenException
- If determining if a token is present fails.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.6.9