fixes for the read method in java
Merge pull request #22 from yushan87/read-fix

fixes for the read method in java