Class LTF8


  • public class LTF8
    extends Object
    Methods to read and write LTF8 as per CRAM specs.
    • Constructor Detail

      • LTF8

        public LTF8()
    • Method Detail

      • readUnsignedLTF8

        public static long readUnsignedLTF8​(InputStream inputStream)
                                     throws IOException
        Reads an unsigned long value from the input stream. The sign bit should be interpreted just as other bits in the value.
        Parameters:
        inputStream - input stream to be read from
        Returns:
        value encoded in the stream as LTF8
        Throws:
        IOException - as per java IO contract
      • writeUnsignedLTF8

        public static int writeUnsignedLTF8​(long value,
                                            OutputStream outputStream)
                                     throws IOException
        Writes an unsigned long value to the output stream. The sign bit is interpreted just as other bits in the value.
        Parameters:
        value - the value to be written
        outputStream - the output stream to write to
        Returns:
        the number of bits written
        Throws:
        IOException - as per java IO contract