@Override
    public void write(final int b) {
        flush();
        writeByte(b);
    }
Output stream writing to a byte array, and capable of writing 1 bit at a time, starting from the most significant bit.
src/main/java/org/apache/commons/imaging/formats/tiff/itu_t4/BitArrayOutputStream.java