Hi,
Trying to port some code over from PHP to Java, but struggling a bit around the buffer part.
php code:
fseek($this->fp, 652256);
$elevation = fread($this->fp, 4); // returns 88
java code:
ByteBuffer buf = ByteBuffer.allocate(4);
fc.read(buf, 652256);
buf.flip();
int elevation = buf.getInt(); // returns 808466488
buf.clear();
I'm r confused :( |