/** * Get an object for handling the token that is currently present in this * slot, or null, if there is no token present. * * @return The object for accessing the token. Or null, if none is present * in this slot. * @exception TokenException * If determining if a token is present fails. * @preconditions * @postconditions */ public Token getToken() throws TokenException { Token token = null; if (getSlotInfo().isTokenPresent()) { token = new Token(this); } return token; }
/** * Returns the string representation of this object. * * @return the string representation of object */ @Override public String toString() { return Util.concatObjectsCap(200, "Slot Description: ", slotDescription, "\nManufacturer ID: ", manufacturerID, "\nHardware Version: ", hardwareVersion, "\nFirmware Version: ", firmwareVersion, "\nFlags: 0X", Util.toFullHex(flags), "\nToken present: ", isTokenPresent(), "\nRemovable Device: ", isRemovableDevice(), "\nHardware Slot: ", isHwSlot()); }
if (!slotInfo.isTokenPresent()) { slotList[i] = null; LOG.info("ignore slot[{}] (id={} without token", i, slot.getSlotID());
if (!slotInfo.isTokenPresent()) { slotList[i] = null; LOG.info("ignore slot[{}] (id={} without token", i, slot.getSlotID());