com.hazelcast.client.impl.protocol.util
public class BufferBuilder extends Object
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_CAPACITY |
Constructor and Description |
---|
BufferBuilder()
Construct a buffer builder with a default growth increment of
INITIAL_CAPACITY |
Modifier and Type | Method and Description |
---|---|
BufferBuilder |
append(ClientProtocolBuffer srcBuffer,
int srcOffset,
int length)
Append a source buffer to the end of the internal buffer, resizing the internal buffer as required.
|
ClientProtocolBuffer |
buffer()
The
ClientProtocolBuffer that encapsulates the internal buffer. |
int |
capacity()
The current capacity of the buffer.
|
int |
position()
The current position of the buffer that has been used by accumulate operations.
|
public static final int INITIAL_CAPACITY
public BufferBuilder()
INITIAL_CAPACITY
public int capacity()
public int position()
public ClientProtocolBuffer buffer()
ClientProtocolBuffer
that encapsulates the internal buffer.ClientProtocolBuffer
that encapsulates the internal buffer.public BufferBuilder append(ClientProtocolBuffer srcBuffer, int srcOffset, int length)
srcBuffer
- from which to copy.srcOffset
- in the source buffer from which to copy.length
- in bytes to copy from the source buffer.Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.