Class ZeroBytesReference

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

public class ZeroBytesReference extends AbstractBytesReference
A BytesReference of the given length which contains all zeroes.
  • Constructor Details

    • ZeroBytesReference

      public ZeroBytesReference(int length)
  • Method Details

    • indexOf

      public int indexOf(byte marker, int from)
      Specified by:
      indexOf in interface BytesReference
      Overrides:
      indexOf in class AbstractBytesReference
    • get

      public byte get(int index)
    • slice

      public BytesReference slice(int from, int length)
    • ramBytesUsed

      public long ramBytesUsed()
    • toBytesRef

      public org.apache.lucene.util.BytesRef toBytesRef()
    • iterator

      public org.apache.lucene.util.BytesRefIterator iterator()