public class ByteBuffer extends Object implements Serializable
| Constructor and Description |
|---|
ByteBuffer(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendByte(byte aByte)
Append a byte to the byte array.
|
void |
appendBytes(byte[] bytes)
Appends a byte array to the byte array.
|
void |
appendBytes(byte[] bytes,
int offset,
int length)
Appends data from a byte array to the byte array.
|
void |
appendString(String str)
Appends data from a string to the byte array.
|
void |
clear()
Sets the size of the byte array to 0.
|
byte[] |
getBuffer()
Gets the backing byte array.
|
int |
getBufferCapacity()
Returns the capacity of the backing byte array.
|
int |
getBufferSize()
Returns the amount of data in the byte array.
|
void |
realloc(int size)
Reallocates the byte array if more space is needed.
|
String |
toString() |
public byte[] getBuffer()
public int getBufferSize()
public int getBufferCapacity()
public void clear()
public void appendByte(byte aByte)
aByte - The byte to append to the array.public void appendBytes(byte[] bytes)
bytes - The bytes to append to the array.public void appendBytes(byte[] bytes,
int offset,
int length)
bytes - The bytes to append to the array.offset - Beginning offset to start copying from.length - Number of bytes to copy.public void appendString(String str)
str - The string to append.public void realloc(int size)
size - parameterCopyright 2004-2019 Solace Corporation. All rights reserved.