org.openlr.binary.reader.OffsetReader Maven / Gradle / Ivy
The newest version!
package org.openlr.binary.reader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
class OffsetReader {
double read(ByteArrayInputStream inputStream) throws IOException {
byte[] bytes = inputStream.readNBytes(1);
byte b = bytes[0];
int value = b & 0xff;
return (value + 0.5) / 256;
}
}