org.openlr.binary.writer.OffsetWriter Maven / Gradle / Ivy
The newest version!
package org.openlr.binary.writer;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
class OffsetWriter {
void write(double value, ByteArrayOutputStream outputStream) throws IOException {
byte b = (byte) Math.floor(value * 256);
outputStream.write(new byte[] { b });
}
}