package net.alphadev.usbstorage.scsi;

import static net.alphadev.usbstorage.util.BitStitching.convertToInt;

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

    private byte mCapacityListLength;
    private int mNumberOfBlocks;


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

    public int getCapacityEntryCount() {
        return mCapacityListLength;
    }
}

@@ -581,11 +581,154 @@
 h;%0A    %7D
+%0A%0A    public static enum DescriptorTypes %7B%0A        RESERVED,%0A        UNFORMATTED_MEDIA,%0A        FORMATTED_MEDIA,%0A        NO_MEDIA_PRESENT%0A    %7D
 %0A%7D%0A

add DescriptorTypes enum.