| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| LogicalBlockDescriptor |
|
| 1.0;1 |
| 1 | package org.jscsi.target.scsi.modeSense; | |
| 2 | ||
| 3 | ||
| 4 | import org.jscsi.target.scsi.ISerializable; | |
| 5 | ||
| 6 | ||
| 7 | /** | |
| 8 | * An abstract parent class for LOGICAL BLOCK DESCRIPTORs used by direct-access block devices as part of | |
| 9 | * {@link ModeParameterList} objects. | |
| 10 | * | |
| 11 | * @author Andreas Ergenzinger | |
| 12 | */ | |
| 13 | public abstract class LogicalBlockDescriptor implements ISerializable { | |
| 14 | ||
| 15 | /** | |
| 16 | * The number of equal-length logical blocks into which the storage medium is divided. | |
| 17 | */ | |
| 18 | protected final long numberOfLogicalBlocks; | |
| 19 | ||
| 20 | /** | |
| 21 | * The length in bytes of the logical blocks. | |
| 22 | */ | |
| 23 | protected final int logicalBlockLength; | |
| 24 | ||
| 25 | /** | |
| 26 | * The constructor. | |
| 27 | * | |
| 28 | * @param numberOfLogicalBlocks the number of equal-length logical blocks into which the storage medium is divided | |
| 29 | * @param logicalBlockLength the length in bytes of the logical blocks | |
| 30 | */ | |
| 31 | 0 | public LogicalBlockDescriptor (final long numberOfLogicalBlocks, final int logicalBlockLength) { |
| 32 | 0 | this.numberOfLogicalBlocks = numberOfLogicalBlocks; |
| 33 | 0 | this.logicalBlockLength = logicalBlockLength; |
| 34 | 0 | } |
| 35 | } |