public interface MutableDirectBuffer extends DirectBuffer
| Modifier and Type | Method and Description |
|---|---|
boolean |
isExpandable()
Is this buffer expandable to accommodate putting data into it beyond the current capacity?
|
void |
putByte(int index,
byte value)
Put a value to a given index.
|
void |
putBytes(int index,
byte[] src)
Put an array of src into the underlying buffer.
|
void |
putBytes(int index,
byte[] src,
int offset,
int length)
Put an array into the underlying buffer.
|
void |
putBytes(int index,
java.nio.ByteBuffer srcBuffer,
int length)
Put bytes into the underlying buffer for the view.
|
void |
putBytes(int index,
java.nio.ByteBuffer srcBuffer,
int srcIndex,
int length)
Put bytes into the underlying buffer for the view.
|
void |
putBytes(int index,
DirectBuffer srcBuffer,
int srcIndex,
int length)
Put bytes from a source
DirectBuffer into this MutableDirectBuffer at given indices. |
void |
putChar(int index,
char value)
Put a value to a given index.
|
void |
putChar(int index,
char value,
java.nio.ByteOrder byteOrder)
Put a value to a given index.
|
void |
putDouble(int index,
double value)
Put a value to a given index.
|
void |
putDouble(int index,
double value,
java.nio.ByteOrder byteOrder)
Put a value to a given index.
|
void |
putFloat(int index,
float value)
Put a value to a given index.
|
void |
putFloat(int index,
float value,
java.nio.ByteOrder byteOrder)
Put a value to a given index.
|
void |
putInt(int index,
int value)
Put a value to a given index.
|
void |
putInt(int index,
int value,
java.nio.ByteOrder byteOrder)
Put a value to a given index.
|
void |
putLong(int index,
long value)
Put a value to a given index.
|
void |
putLong(int index,
long value,
java.nio.ByteOrder byteOrder)
Put a value to a given index.
|
void |
putShort(int index,
short value)
Put a value to a given index.
|
void |
putShort(int index,
short value,
java.nio.ByteOrder byteOrder)
Put a value to a given index.
|
int |
putStringUtf8(int index,
java.lang.String value)
Encode a String as UTF-8 bytes to the buffer with a length prefix.
|
int |
putStringUtf8(int index,
java.lang.String value,
java.nio.ByteOrder byteOrder)
Encode a String as UTF-8 bytes to the buffer with a length prefix.
|
int |
putStringUtf8(int index,
java.lang.String value,
java.nio.ByteOrder byteOrder,
int maxEncodedSize)
Encode a String as UTF-8 bytes the buffer with a length prefix with a maximum encoded size check.
|
int |
putStringUtf8(int index,
java.lang.String value,
int maxEncodedSize)
Encode a String as UTF-8 bytes the buffer with a length prefix with a maximum encoded size check.
|
int |
putStringWithoutLengthUtf8(int index,
java.lang.String value)
Encode a String as UTF-8 bytes in the buffer without a length prefix.
|
void |
setMemory(int index,
int length,
byte value)
Set a region of memory to a given byte value.
|
addressOffset, boundsCheck, byteArray, byteBuffer, capacity, checkLimit, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getStringUtf8, getStringUtf8, getStringUtf8, getStringWithoutLengthUtf8, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrapAdjustmentboolean isExpandable()
void setMemory(int index,
int length,
byte value)
index - at which to start.length - of the run of bytes to set.value - the memory will be set to.void putLong(int index,
long value,
java.nio.ByteOrder byteOrder)
index - in bytes for where to put.value - for at a given indexbyteOrder - of the value when writtenvoid putLong(int index,
long value)
index - in bytes for where to put.value - for at a given indexvoid putInt(int index,
int value,
java.nio.ByteOrder byteOrder)
index - in bytes for where to put.value - to be writtenbyteOrder - of the value when writtenvoid putInt(int index,
int value)
index - in bytes for where to put.value - for at a given indexvoid putDouble(int index,
double value,
java.nio.ByteOrder byteOrder)
index - in bytes for where to put.value - to be writtenbyteOrder - of the value when written.void putDouble(int index,
double value)
index - in bytes for where to put.value - to be writtenvoid putFloat(int index,
float value,
java.nio.ByteOrder byteOrder)
index - in bytes for where to put.value - to be writtenbyteOrder - of the value when written.void putFloat(int index,
float value)
index - in bytes for where to put.value - to be writtenvoid putShort(int index,
short value,
java.nio.ByteOrder byteOrder)
index - in bytes for where to put.value - to be writtenbyteOrder - of the value when written.void putShort(int index,
short value)
index - in bytes for where to put.value - to be writtenvoid putChar(int index,
char value,
java.nio.ByteOrder byteOrder)
index - in bytes for where to put.value - to be writtenbyteOrder - of the value when written.void putChar(int index,
char value)
index - in bytes for where to put.value - to be writtenvoid putByte(int index,
byte value)
index - in bytes for where to put.value - to be writtenvoid putBytes(int index,
byte[] src)
index - in the underlying buffer to start from.src - to be copied to the underlying buffer.void putBytes(int index,
byte[] src,
int offset,
int length)
index - in the underlying buffer to start from.src - to be copied to the underlying buffer.offset - in the supplied buffer to begin the copy.length - of the supplied buffer to copy.void putBytes(int index,
java.nio.ByteBuffer srcBuffer,
int length)
Buffer.position() for a given length.
The source buffer will have its Buffer.position() advanced as a result.index - in the underlying buffer to start from.srcBuffer - to copy the bytes from.length - of the supplied buffer to copy.void putBytes(int index,
java.nio.ByteBuffer srcBuffer,
int srcIndex,
int length)
Buffer.position() advanced as a result.index - in the underlying buffer to start from.srcBuffer - to copy the bytes from (does not change position).srcIndex - in the source buffer from which the copy will begin.length - of the bytes to be copied.void putBytes(int index,
DirectBuffer srcBuffer,
int srcIndex,
int length)
DirectBuffer into this MutableDirectBuffer at given indices.index - in this buffer to begin putting the bytes.srcBuffer - from which the bytes will be copied.srcIndex - in the source buffer from which the byte copy will begin.length - of the bytes to be copied.int putStringUtf8(int index,
java.lang.String value)
index - at which the String should be encoded.value - of the String to be encoded.int putStringUtf8(int index,
java.lang.String value,
java.nio.ByteOrder byteOrder)
index - at which the String should be encoded.value - of the String to be encoded.byteOrder - for the length prefix.int putStringUtf8(int index,
java.lang.String value,
int maxEncodedSize)
index - at which the String should be encoded.value - of the String to be encoded.maxEncodedSize - to be checked before writing to the buffer.java.lang.IllegalArgumentException - if the encoded bytes are greater than maxEncodedSize.int putStringUtf8(int index,
java.lang.String value,
java.nio.ByteOrder byteOrder,
int maxEncodedSize)
index - at which the String should be encoded.value - of the String to be encoded.byteOrder - for the length prefix.maxEncodedSize - to be checked before writing to the buffer.java.lang.IllegalArgumentException - if the encoded bytes are greater than maxEncodedSize.int putStringWithoutLengthUtf8(int index,
java.lang.String value)
index - at which the String begins.value - of the String to be encoded.Copyright © 2014 - 2016 Real Logic Ltd. All Rights Reserved.