Class ScsiRead10


  • public class ScsiRead10
    extends CommandBlockWrapper
    SCSI command to read from the mass storage device. The 10 means that the transfer length is two byte and the logical block address field is four byte. Thus the hole command takes 10 byte when serialized.

    The actual data is transferred in the data phase.

    • Constructor Detail

      • ScsiRead10

        public ScsiRead10()
        Constructs a new read command without any information. Be sure to call init(int, int, int) before transfering command to device.
      • ScsiRead10

        public ScsiRead10​(int blockAddress,
                          int transferBytes,
                          int blockSize)
        Constructs a new read command with the given information.
        Parameters:
        blockAddress - The logical block address the read should start.
        transferBytes - The bytes which should be transferred.
        blockSize - The block size of the mass storage device.
    • Method Detail

      • init

        public void init​(int blockAddress,
                         int transferBytes,
                         int blockSize)
      • serialize

        public void serialize​(java.nio.ByteBuffer buffer)
        Description copied from class: CommandBlockWrapper
        Serializes the command block wrapper for transmission.

        This method should be called in every subclass right before the specific SCSI command serializes itself to the buffer!

        Overrides:
        serialize in class CommandBlockWrapper
        Parameters:
        buffer - The buffer were the serialized data should be copied to.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object