Review completely the javalib

This will flush this stream, since the `OutputStreamWriter` will call `write(buf: Array[Byte], ...)`. ==>  bad