All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy