@InterfaceAudience.Private public final class ByteBufferArray extends Object
| Constructor and Description |
|---|
ByteBufferArray(long capacity,
boolean directByteBuffer)
We allocate a number of byte buffers as the capacity.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMultiple(long start,
int len,
byte[] dstArray)
Transfers bytes from this buffer array into the given destination array
|
int |
getMultiple(long start,
int len,
byte[] dstArray,
int dstOffset)
Transfers bytes from this buffer array into the given destination array
|
void |
putMultiple(long start,
int len,
byte[] srcArray)
Transfers bytes from the given source array into this buffer array
|
void |
putMultiple(long start,
int len,
byte[] srcArray,
int srcOffset)
Transfers bytes from the given source array into this buffer array
|
public ByteBufferArray(long capacity,
boolean directByteBuffer)
multiple(long, int, byte[], int, org.apache.hadoop.hbase.util.ByteBufferArray.Visitor)),
we will allocate one additional buffer with capacity 0;capacity - total size of the byte buffer arraydirectByteBuffer - true if we allocate direct bufferpublic int getMultiple(long start,
int len,
byte[] dstArray)
start - start position in the ByteBufferArraylen - The maximum number of bytes to be written to the given arraydstArray - The array into which bytes are to be writtenpublic int getMultiple(long start,
int len,
byte[] dstArray,
int dstOffset)
start - start offset of this buffer arraylen - The maximum number of bytes to be written to the given arraydstArray - The array into which bytes are to be writtendstOffset - The offset within the given array of the first byte to be
writtenpublic void putMultiple(long start,
int len,
byte[] srcArray)
start - start offset of this buffer arraylen - The maximum number of bytes to be read from the given arraysrcArray - The array from which bytes are to be readpublic void putMultiple(long start,
int len,
byte[] srcArray,
int srcOffset)
start - start offset of this buffer arraylen - The maximum number of bytes to be read from the given arraysrcArray - The array from which bytes are to be readsrcOffset - The offset within the given array of the first byte to be
readCopyright © 2014 The Apache Software Foundation. All rights reserved.