Review completely the javalib

Hum... `read` should return a positive number... why did you remove this?