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, writeTopublic 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)
BytesReferenceget in class BytesReferencepublic int length()
BytesReferencelength in class BytesReferencepublic BytesReference slice(int from, int length)
BytesReferenceslice in class BytesReferencepublic byte[] array()
public int offset()
public org.apache.lucene.util.BytesRef toBytesRef()
BytesReferencetoBytesRef in class BytesReferencepublic long ramBytesUsed()