public class DataBuffer
extends java.lang.Object
| Constructor and Description |
|---|
DataBuffer(java.nio.ByteBuffer buffer)
Create a buffer
|
| Modifier and Type | Method and Description |
|---|---|
int |
copyPartToByteArray(int bufferLocation,
byte[] value,
int startIndex,
int byteLength)
Copies a part of the ByteBuffer to the given byte array
|
java.nio.ByteBuffer |
getByteBuffer() |
int |
getCapacity() |
int |
getSize() |
void |
setSize(int size) |
public DataBuffer(java.nio.ByteBuffer buffer)
buffer - the underlying byte bufferpublic void setSize(int size)
public int getCapacity()
public int getSize()
public java.nio.ByteBuffer getByteBuffer()
public int copyPartToByteArray(int bufferLocation,
byte[] value,
int startIndex,
int byteLength)
bufferLocation - starting position of byteBuffervalue - byte array to copy datastartIndex - initial index of the byte arraybyteLength - no of bytes top copy