public class BufferSegment
extends java.lang.Object
Constructor and Description |
---|
BufferSegment(byte[] buffer)
Creates a BufferSegment that specifies the whole byte array (offset=0
and size=buffer.length).
|
BufferSegment(byte[] buffer,
int offset,
int size)
Creates a new BufferSegment.
|
public BufferSegment(byte[] buffer, int offset, int size)
buffer
- the byte arrayoffset
- starting offset into the byte array in bytessize
- the number of bytes in the segmentpublic BufferSegment(byte[] buffer)
buffer
- the byte arraypublic byte[] getBuffer()
public void setBuffer(byte[] buffer)
buffer
- the buffer to setpublic int getOffset()
public void setOffset(int offset)
offset
- the offset to setpublic int getSize()
public void setSize(int size)
size
- the size to set