Class IF_FBINARY.FullyConsumingPrefixer

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int decodeLength​(byte[] bytes, int offset)
      Decodes an encoded length.
      void encodeLength​(int length, byte[] bytes)
      Fills a byte array with the field length data in raw form.
      int getPackedLength()
      Returns the number of bytes taken up by the length encoding.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • encodeLength

        public void encodeLength​(int length,
                                 byte[] bytes)
        Description copied from interface: Prefixer
        Fills a byte array with the field length data in raw form.
        Specified by:
        encodeLength in interface Prefixer
        Parameters:
        length - The length to be encoded.
        bytes - The byte array to fill with the encoded length.
      • decodeLength

        public int decodeLength​(byte[] bytes,
                                int offset)
        Description copied from interface: Prefixer
        Decodes an encoded length.
        Specified by:
        decodeLength in interface Prefixer
        Parameters:
        bytes - The byte array to scan for the length.
        offset - The offset to start scanning from.
        Returns:
        The length in chars of the field data to follow this LengthPrefix.