protected int readBooleanArray(boolean[] b) throws IOException {
        byte[] bx = new byte[b.length];

        if (read(bx, 0, bx.length) < bx.length) {
            primitiveEOFThrower();
        }

        for (int i=0; i < b.length; i += 1) {
            if (bx[i] == 1) {
                b[i] = true;
            } else {
                b[i] = false;
            }
        }
        return bx.length;
    }