private byte[] getBytes(int needReadlength, int size) throws IOException {
        BitSet retSet = new BitSet(size);
        int i = 0;
        while (i < needReadlength) {
            if (!this.moveNext()) {
                throw new IOException("Unexpected to meet the byte array end.");
            }
            if (getCurrent()) {
                retSet.set(i);
            } else {
                retSet.clear(i);
            }
            i++;
        }
        byte[] result = new byte[size];
        Arrays.fill(result, (byte) 0);
        byte[] retSetBa = retSet.toByteArray();
        for (i = 0; i < retSetBa.length; ++i) {
            result[i] = retSetBa[i];
        }
        return result;
    }
Construct a byte array with specified bit length and the specified the byte array size.

@param needReadlength Specify the need read bit length.
@param size           Specify the byte array size.
@return Returns the constructed byte array.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/util/BitReader.java