Class PagedBytesReference

java.lang.Object
org.elasticsearch.common.bytes.AbstractBytesReference
org.elasticsearch.common.bytes.PagedBytesReference
All Implemented Interfaces:
Comparable<BytesReference>, BytesReference, ToXContent, ToXContentFragment

public class PagedBytesReference extends AbstractBytesReference
A page based bytes reference, internally holding the bytes in a paged data structure.
  • Method Details

    • get

      public byte get(int index)
      Description copied from interface: BytesReference
      Returns the byte at the specified index. Need to be between 0 and length.
    • slice

      public BytesReference slice(int from, int length)
      Description copied from interface: BytesReference
      Slice the bytes from the from index up to length.
    • toBytesRef

      public org.apache.lucene.util.BytesRef toBytesRef()
      Description copied from interface: BytesReference
      Converts to Lucene BytesRef.
    • iterator

      public final org.apache.lucene.util.BytesRefIterator iterator()
      Description copied from interface: BytesReference
      Returns a BytesRefIterator for this BytesReference. This method allows access to the internal pages of this reference without copying them. It must return direct references to the pages, not copies. Use with care!
      See Also:
      • BytesRefIterator
    • ramBytesUsed

      public long ramBytesUsed()
      Description copied from interface: BytesReference
      The amount of memory used by this BytesReference