Class ScsiWrite10


  • public class ScsiWrite10
    extends CommandBlockWrapper
    SCSI command to write to 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

      • ScsiWrite10

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

        public ScsiWrite10​(int blockAddress,
                           int transferBytes,
                           int blockSize)
        Constructs a new write command with the given information.
        Parameters:
        blockAddress - The logical block address the write 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