Class Utf8PartialArray

  • All Implemented Interfaces:
    java.lang.Comparable<AbstractUtf8Array>

    public class Utf8PartialArray
    extends Utf8Array
    This wraps a window in a backing byte array. Without doing any copying.
    Since:
    5.2
    Author:
    baldersheim
    • Constructor Detail

      • Utf8PartialArray

        public Utf8PartialArray​(byte[] utf8data,
                                int offset,
                                int bytes)
        Takes ownership of the given byte array. And keeps note of where the interesting utf8 sequence start and its length.
        Parameters:
        utf8data - The backing byte array.
        offset - The start of the utf8 sequence.
        bytes - The length of the utf8 sequence.
    • Method Detail

      • getByteLength

        public int getByteLength()
        Overrides:
        getByteLength in class Utf8Array
        Returns:
        Length in bytes of the utf8 sequence.
      • getByteOffset

        protected int getByteOffset()
        Overrides:
        getByteOffset in class Utf8Array
        Returns:
        The offset in the backing array where the utf8 sequence starts.