public final class CompositeBytesReference extends BytesReference
BytesReference
that allows joining multiple bytes references
into one without copying.
Note, toBytesRef()
will materialize all pages in this BytesReference.Constructor and Description |
---|
CompositeBytesReference(BytesReference... references) |
Modifier and Type | Method and Description |
---|---|
byte |
get(int index)
Returns the byte at the specified index.
|
org.apache.lucene.util.BytesRefIterator |
iterator()
Returns a BytesRefIterator for this BytesReference.
|
int |
length()
The length.
|
long |
ramBytesUsed() |
BytesReference |
slice(int from,
int length)
Slice the bytes from the from index up to length.
|
org.apache.lucene.util.BytesRef |
toBytesRef()
Converts to Lucene BytesRef.
|
compareTo, equals, hashCode, streamInput, toBytes, utf8ToString, writeTo
public CompositeBytesReference(BytesReference... references)
public byte get(int index)
BytesReference
get
in class BytesReference
public int length()
BytesReference
length
in class BytesReference
public BytesReference slice(int from, int length)
BytesReference
slice
in class BytesReference
public org.apache.lucene.util.BytesRef toBytesRef()
BytesReference
toBytesRef
in class BytesReference
public org.apache.lucene.util.BytesRefIterator iterator()
BytesReference
iterator
in class BytesReference
BytesRefIterator
public long ramBytesUsed()