Adding flushInput and flushOutput method to InternalBufferedStream.