1 package org.jscsi.target.scsi.modeSense;
2
3
4 import java.nio.ByteBuffer;
5
6 import org.jscsi.target.util.ReadWrite;
7
8
9
10
11
12
13
14
15
16
17 public final class ShortLogicalBlockDescriptor extends LogicalBlockDescriptor {
18
19
20
21
22 static final int SIZE = 8;
23
24
25
26
27
28
29
30 public ShortLogicalBlockDescriptor (long numberOfLogicalBlocks, int logicalBlockLength) {
31 super(numberOfLogicalBlocks, logicalBlockLength);
32 }
33
34 public void serialize (ByteBuffer byteBuffer, int index) {
35
36 ReadWrite.writeInt((int) numberOfLogicalBlocks,
37 byteBuffer,
38 index);
39
40
41 ReadWrite.writeThreeByteInt(byteBuffer,
42 logicalBlockLength,
43 index + 5);
44 }
45
46 public int size () {
47 return SIZE;
48 }
49
50 }