public interface BytesReference
Modifier and Type | Method and Description |
---|---|
byte |
get(int index)
Returns the byte at the specified index.
|
int |
indexOf(byte b,
int offset,
int len)
Find the index of a given byte, in the given area.
|
int |
length()
The length.
|
BytesReference |
slice(int from,
int length)
Slice the bytes from the from index up to length.
|
byte[] |
toBytes()
Returns the bytes as a single byte array.
|
java.lang.String |
toUtf8()
Converts to a string based on utf8.
|
byte get(int index)
index
- indexint length()
int indexOf(byte b, int offset, int len)
b
- the byteoffset
- offsetlen
- lenBytesReference slice(int from, int length)
from
- fromlength
- lengthbyte[] toBytes()
java.lang.String toUtf8()