Package org.elasticsearch.common.util
Interface ByteArray
- All Superinterfaces:
org.apache.lucene.util.Accountable
,java.lang.AutoCloseable
,BigArray
,java.io.Closeable
,Releasable
public interface ByteArray extends BigArray
Abstraction of an array of byte values.
-
Method Summary
Modifier and Type Method Description void
fill(long fromIndex, long toIndex, byte value)
Fill slots betweenfromIndex
inclusive totoIndex
exclusive withvalue
.byte
get(long index)
Get an element given its index.boolean
get(long index, int len, org.apache.lucene.util.BytesRef ref)
Get a reference to a slice.byte
set(long index, byte value)
Set a value at the given index and return the previous value.void
set(long index, byte[] buf, int offset, int len)
Bulk set.
-
Method Details
-
get
byte get(long index)Get an element given its index. -
set
byte set(long index, byte value)Set a value at the given index and return the previous value. -
get
boolean get(long index, int len, org.apache.lucene.util.BytesRef ref)Get a reference to a slice.- Returns:
true
when a byte[] was materialized,false
otherwise.
-
set
void set(long index, byte[] buf, int offset, int len)Bulk set. -
fill
void fill(long fromIndex, long toIndex, byte value)Fill slots betweenfromIndex
inclusive totoIndex
exclusive withvalue
.
-