java: call into util.BinaryReader when reading the basic types