public class Slot extends Object
Token token = slot.getToken();
// to ensure that there is a token present in the slot
if (token != null) {
// ... work with the token
}
| Modifier | Constructor and Description |
|---|---|
protected |
Slot(PKCS11Module module,
long slotID)
The constructor that takes a reference to the module and the slot ID.
|
| Modifier and Type | Method and Description |
|---|---|
PKCS11Module |
getModule()
Get the module that created this Slot object.
|
Token |
getNullableToken()
Get an object for handling the token that is currently present in this
slot, or null, if there is no token present.
|
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.
|
boolean |
isUseUtf8Encoding()
Returns whether UTF8 encoding is set.
|
void |
setUseUtf8Encoding(boolean useUtf8Encoding)
Specify, whether UTF8 character encoding shall be used for character
array attributes and PINs.
|
String |
toString()
Returns the string representation of this object.
|
protected Slot(PKCS11Module module, long slotID)
module - The reference to the module of this slot.slotID - The identifier of the slot.public void setUseUtf8Encoding(boolean useUtf8Encoding)
useUtf8Encoding - true, if UTF8 shall be usedpublic boolean isUseUtf8Encoding()
public PKCS11Module getModule()
public long getSlotID()
public SlotInfo getSlotInfo() throws PKCS11Exception
PKCS11Exception - If reading the information fails.public Token getNullableToken() throws PKCS11Exception
PKCS11Exception - If determining whether a token is present fails.public Token getToken()
Copyright © 2023. All rights reserved.