Class AbstractEncodedMessage

    • Constructor Detail

      • AbstractEncodedMessage

        public AbstractEncodedMessage()
        Empty constructor.

        This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.

        Since:
        12.0
    • 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