Review completely the javalib

Ah, no, I remember, now. I can't do a `while` loop of `read()`s, because the second or a later `read()` might block (understand: crash), whereas the first one succeeded.

I could allocate a temporary `Array[Char]` of the size of `target.remaining` and use `read(array)`, but that might be big.