java.lang.Comparable<BytesReference>
, org.apache.lucene.util.Accountable
, ToXContent
, ToXContentFragment
public final class BytesArray extends BytesReference
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field | Description |
---|---|---|
static BytesArray |
EMPTY |
EMPTY_PARAMS
Constructor | Description |
---|---|
BytesArray(byte[] bytes) |
|
BytesArray(byte[] bytes,
int offset,
int length) |
|
BytesArray(java.lang.String bytes) |
|
BytesArray(org.apache.lucene.util.BytesRef bytesRef) |
|
BytesArray(org.apache.lucene.util.BytesRef bytesRef,
boolean deepCopy) |
Modifier and Type | Method | 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.
|
bytes, compareTo, equals, hashCode, iterator, streamInput, toBytes, toXContent, utf8ToString, writeTo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFragment
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()