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, writeTopublic CompositeBytesReference(BytesReference... references)
public byte get(int index)
BytesReferenceget in class BytesReferencepublic int length()
BytesReferencelength in class BytesReferencepublic BytesReference slice(int from, int length)
BytesReferenceslice in class BytesReferencepublic org.apache.lucene.util.BytesRef toBytesRef()
BytesReferencetoBytesRef in class BytesReferencepublic org.apache.lucene.util.BytesRefIterator iterator()
BytesReferenceiterator in class BytesReferenceBytesRefIteratorpublic long ramBytesUsed()