   protected void execute(
         ByteBuffer buffer,
         int blockLength,
         TargetTransportPort targetPort,
         Command command,
         ModePageRegistry modePageRegistry,
         InquiryDataRegistry inquiryDataRegistry) throws InterruptedException, SenseException
   {
      _logger.debug(">>> executing task: " + this);
      long capacity = this.getFileCapacity();
      TransferCDB cdb = (TransferCDB)command.getCommandDescriptorBlock();
      long lba = cdb.getLogicalBlockAddress();
      long transferLength = cdb.getTransferLength();
      if ( lba < 0 || transferLength < 0 || lba > capacity || (lba + transferLength) > capacity)
      {
         switch (cdb.getOperationCode())
         {
            case Read6.OPERATION_CODE:
               throw new LogicalBlockAddressOutOfRangeException(true, true, (byte)4, 1);
            default:
               throw new LogicalBlockAddressOutOfRangeException(true, true, 2);
         }
      }
      buffer = buffer.duplicate();
      buffer.position((int)(lba * blockLength));
      buffer.limit((int)(transferLength * blockLength));
      if ( ! this.writeData(buffer) )
      {
         throw new SynchronousDataTransferErrorException();
      }
      this.writeResponse(Status.GOOD, null);
   }

   protected void execute(
         ByteBuffer buffer,
         int blockLength,
         TargetTransportPort targetPort,
         Command command,
         ModePageRegistry modePageRegistry,
         InquiryDataRegistry inquiryDataRegistry) throws InterruptedException, SenseException
   {
      _logger.debug(">>> executing task: " + this);
      long capacity = this.getFileCapacity();
      TransferCDB cdb = (TransferCDB)command.getCommandDescriptorBlock();
      long lba = cdb.getLogicalBlockAddress();
      long transferLength = cdb.getTransferLength();
      if ( lba < 0 || transferLength < 0 || lba > capacity || (lba + transferLength) > capacity)
      {
         switch (cdb.getOperationCode())
         {
            case Read6.OPERATION_CODE:
               throw new LogicalBlockAddressOutOfRangeException(true, true, (byte)4, 1);
            default:
               throw new LogicalBlockAddressOutOfRangeException(true, true, 2);
         }
      }
      buffer = buffer.duplicate();
      buffer.position((int)(lba * blockLength));
      buffer.limit((int)(transferLength * blockLength) + (int)(lba * blockLength));
      if ( ! this.writeData(buffer) )
      {
         throw new SynchronousDataTransferErrorException();
      }
      this.writeResponse(Status.GOOD, null);
   }
