package net.alphadev.usbstorage.scsi;

/**
 * Created by jan on 29.08.14.
 */
public class ReadFormatCapacitiesHeader {
    public static final int LENGTH = 12;

    private byte mCapacityListLength;

    public ReadFormatCapacitiesHeader(byte[] answer) {
        /** first three bits are reserved **/
        mCapacityListLength = answer[3];


    }

    public int getCapacityEntryCount() {
        return mCapacityListLength;
    }
}

@@ -32,16 +32,87 @@
 .scsi;%0A%0A
+import static net.alphadev.usbstorage.util.BitStitching.convertToInt;%0A%0A
 /**%0A * C
@@ -264,16 +264,50 @@
 Length;%0A
+    private int mNumberOfBlocks;%0A%0A
 %0A    pub
@@ -441,17 +441,66 @@
 wer%5B3%5D;%0A
-%0A
+        mNumberOfBlocks = convertToInt(answer, 4);
 %0A    %7D%0A%0A

add numberof blocks of current/maximum capacity descriptor.