Class AbstractBytesReference

All Implemented Interfaces:
java.lang.Comparable<BytesReference>, BytesReference, ToXContent, ToXContentFragment
Direct Known Subclasses:
ByteBufferReference, BytesArray, CompositeBytesReference, PagedBytesReference

public abstract class AbstractBytesReference
extends java.lang.Object
implements BytesReference
  • Constructor Details

  • Method Details

    • getInt

      public int getInt​(int index)
      Description copied from interface: BytesReference
      Returns the integer read from the 4 bytes (BE) starting at the given index.
      Specified by:
      getInt in interface BytesReference
    • indexOf

      public int indexOf​(byte marker, int from)
      Description copied from interface: BytesReference
      Finds the index of the first occurrence of the given marker between within the given bounds.
      Specified by:
      indexOf in interface BytesReference
      marker - marker byte to search
      from - lower bound for the index to check (inclusive)
      first index of the marker or -1 if not found
    • streamInput

      public StreamInput streamInput() throws
      Description copied from interface: BytesReference
      A stream input of the bytes.
      Specified by:
      streamInput in interface BytesReference
    • writeTo

      public void writeTo​( os) throws
      Description copied from interface: BytesReference
      Writes the bytes directly to the output stream.
      Specified by:
      writeTo in interface BytesReference
    • utf8ToString

      public java.lang.String utf8ToString()
      Description copied from interface: BytesReference
      Interprets the referenced bytes as UTF8 bytes, returning the resulting string
      Specified by:
      utf8ToString in interface BytesReference
    • iterator

      public 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. Use with care!
      Specified by:
      iterator in interface BytesReference
      See Also:
    • equals

      public boolean equals​(java.lang.Object other)
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      hashCode in class java.lang.Object
    • compareTo

      public int compareTo​(BytesReference other)
      Specified by:
      compareTo in interface java.lang.Comparable<BytesReference>
    • toXContent

      public XContentBuilder toXContent​(XContentBuilder builder, ToXContent.Params params) throws
      Specified by:
      toXContent in interface ToXContent