public final class BytesArray extends BytesReference
Modifier and Type | Field and Description |
---|---|
static BytesArray |
EMPTY |
Constructor and Description |
---|
BytesArray(byte[] bytes) |
BytesArray(byte[] bytes,
int offset,
int length) |
BytesArray(org.apache.lucene.util.BytesRef bytesRef) |
BytesArray(org.apache.lucene.util.BytesRef bytesRef,
boolean deepCopy) |
BytesArray(java.lang.String bytes) |
Modifier and Type | Method and Description |
---|---|
byte[] |
array() |
byte |
get(int index)
Returns the byte at the specified index.
|
int |
length()
The length.
|
int |
offset() |
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, iterator, streamInput, toBytes, utf8ToString, writeTo
public static final BytesArray EMPTY
public BytesArray(java.lang.String bytes)
public BytesArray(org.apache.lucene.util.BytesRef bytesRef)
public BytesArray(org.apache.lucene.util.BytesRef bytesRef, boolean deepCopy)
public BytesArray(byte[] bytes)
public BytesArray(byte[] bytes, int offset, int length)
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 byte[] array()
public int offset()
public org.apache.lucene.util.BytesRef toBytesRef()
BytesReference
toBytesRef
in class BytesReference
public long ramBytesUsed()