public interface MutableDirectBuffer extends DirectBuffer
ByteOrder of a wrapped buffer is not applied to the MutableDirectBuffer;
To control ByteOrder use the appropriate method with the ByteOrder overload.
| 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.
|
int |
putIntAscii(int index,
int value)
Puts an ASCII encoded int into the buffer
|
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.
|
int |
putLongAscii(int index,
long value)
Puts an ASCII encoded long integer into the buffer
|
int |
putNaturalIntAscii(int index,
int value)
Puts an ASCII encoded int sized natural number into the buffer
|
int |
putNaturalIntAsciiFromEnd(int value,
int endExclusive)
Encode a natural number starting at its end position.
|
int |
putNaturalLongAscii(int index,
long value)
Puts an ASCII encoded long sized natural number into the buffer
|
void |
putNaturalPaddedIntAscii(int index,
int length,
int value)
Encode a natural number with a specified maximum length.
|
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 |
putStringAscii(int index,
java.lang.String value)
Encode a String as ASCII bytes to the buffer with a length prefix.
|
int |
putStringAscii(int index,
java.lang.String value,
java.nio.ByteOrder byteOrder)
Encode a String as ASCII bytes to the buffer with a length prefix.
|
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 maxEncodedLength)
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 maxEncodedLength)
Encode a String as UTF-8 bytes the buffer with a length prefix with a maximum encoded size check.
|
int |
putStringWithoutLengthAscii(int index,
java.lang.String value)
Encode a String as ASCII bytes in the buffer without a length prefix.
|
int |
putStringWithoutLengthAscii(int index,
java.lang.String value,
int valueOffset,
int length)
Encode a String as ASCII bytes in the buffer without a length prefix taking a range of the value.
|
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, getStringAscii, getStringAscii, getStringAscii, getStringUtf8, getStringUtf8, getStringUtf8, getStringWithoutLengthAscii, getStringWithoutLengthUtf8, parseIntAscii, parseLongAscii, parseNaturalIntAscii, parseNaturalLongAscii, 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 indexint putIntAscii(int index,
int value)
index - the offset at which to put the intvalue - the int to writeint putNaturalIntAscii(int index,
int value)
index - the offset at which to put the intvalue - the int to writevoid putNaturalPaddedIntAscii(int index,
int length,
int value)
throws java.lang.NumberFormatException
NumberFormatException will be thrown.index - the offset to start encoding atlength - the maximum length to encode.value - the value to encodejava.lang.NumberFormatException - if the value won't fit within the length.int putNaturalIntAsciiFromEnd(int value,
int endExclusive)
value - the natural number to encodeendExclusive - index after the last character encodedint putNaturalLongAscii(int index,
long value)
index - the offset at which to put the intvalue - the int to writeint putLongAscii(int index,
long value)
index - the offset at which to put the intvalue - the int to writevoid 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)
The source buffer will not have its 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 putStringAscii(int index,
java.lang.String value)
index - at which the String should be encoded.value - of the String to be encoded.int putStringAscii(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 putStringWithoutLengthAscii(int index,
java.lang.String value)
index - at which the String begins.value - of the String to be encoded.int putStringWithoutLengthAscii(int index,
java.lang.String value,
int valueOffset,
int length)
index - at which the String begins.value - of the String to be encoded.valueOffset - in the value String to begin.length - of the value String to encode. If this is greater than valueOffset - value length then the
lesser will be used.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 maxEncodedLength)
index - at which the String should be encoded.value - of the String to be encoded.maxEncodedLength - to be checked before writing to the buffer.java.lang.IllegalArgumentException - if the encoded bytes are greater than maxEncodedLength.int putStringUtf8(int index,
java.lang.String value,
java.nio.ByteOrder byteOrder,
int maxEncodedLength)
index - at which the String should be encoded.value - of the String to be encoded.byteOrder - for the length prefix.maxEncodedLength - to be checked before writing to the buffer.java.lang.IllegalArgumentException - if the encoded bytes are greater than maxEncodedLength.int putStringWithoutLengthUtf8(int index,
java.lang.String value)
index - at which the String begins.value - of the String to be encoded.Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.