Implement those methods:
1 - ImageOutputStreamImpl.writeBit(int bit)
2 - ImageOutputStreamImpl.writeBits(writeBits(long bits, int numBits)
3 - ImageOutputStreamImpl.flushBits()
They are kind of related, so I put the implementations for those methods in one patch.
Spec - http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/api/javax/imageio/stream/ImageOutputStreamImpl.html#writeBit(int)
I have also modified the existing test case for a bit in order to perform the test. The code of ImageOutputStreamImplTest.BasicImageOutputStreamImpl.read() is copied from ImageInputStreamImplTest.BasicImageInputStreamImpl.read().