SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
final int initiatorTaskTag = bhs.getInitiatorTaskTag();
WriteCdb cdb;
final ScsiOperationCode scsiOpCode = ScsiOperationCode.valueOf(parser.getCDB().get(0));
if (scsiOpCode == ScsiOperationCode.WRITE_10)
cdb = new Write10Cdb(parser.getCDB());
else if (scsiOpCode == ScsiOperationCode.WRITE_6)
cdb = new Write6Cdb(parser.getCDB());
else {
// anything else wouldn't be good (programmer error)
// close connection