public void execute (ProtocolDataUnit pdu) throws IOException , InterruptedException , InternetSCSIException , DigestException , SettingsException {
// find out the type of READ CAPACITY command ((10) or (16))
final BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
final SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
final ScsiOperationCode opCode = ScsiOperationCode.valueOf(parser.getCDB().get(0));
ReadCapacityCdb cdb;
if (opCode == ScsiOperationCode.READ_CAPACITY_10)
cdb = new ReadCapacity10Cdb(parser.getCDB());
else if (opCode == ScsiOperationCode.READ_CAPACITY_16)
cdb = new ReadCapacity16Cdb(parser.getCDB());