Class ScsiRead10
- java.lang.Object
-
- com.github.mjdev.libaums.driver.scsi.commands.CommandBlockWrapper
-
- com.github.mjdev.libaums.driver.scsi.commands.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.mjdev.libaums.driver.scsi.commands.CommandBlockWrapper
CommandBlockWrapper.Direction
-
-
Field Summary
-
Fields inherited from class com.github.mjdev.libaums.driver.scsi.commands.CommandBlockWrapper
dCbwDataTransferLength
-
-
Constructor Summary
Constructors Constructor Description ScsiRead10()
Constructs a new read command without any information.ScsiRead10(int blockAddress, int transferBytes, int blockSize)
Constructs a new read command with the given information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(int blockAddress, int transferBytes, int blockSize)
void
serialize(java.nio.ByteBuffer buffer)
Serializes the command block wrapper for transmission.java.lang.String
toString()
-
Methods inherited from class com.github.mjdev.libaums.driver.scsi.commands.CommandBlockWrapper
getdCbwDataTransferLength, getdCbwTag, getDirection, setdCbwTag
-
-
-
-
Constructor Detail
-
ScsiRead10
public ScsiRead10()
Constructs a new read command without any information. Be sure to callinit(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 classCommandBlockWrapper
- Parameters:
buffer
- The buffer were the serialized data should be copied to.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-