Class AbstractEncodedMessages

    • Constructor Detail

      • AbstractEncodedMessages

        public AbstractEncodedMessages()
    • Method Detail

      • start

        public void start()
        Start message extraction.
        Specified by:
        start in interface EncodedMessage
      • fetchByte

        protected abstract int fetchByte()
        Fetch the next byte from the message.
        Returns:
        next byte from the message, as a primitive integer, or -1 if end of data has been reached
      • extractBits

        public long extractBits​(int n)
        Extract the next n bits from the encoded message.
        Specified by:
        extractBits in interface EncodedMessage
        Parameters:
        n - number of bits to extract (cannot exceed 32 bits)
        Returns:
        bits packed as the LSB of a 64 bits primitive long