public static final class BinaryOutput.ByteArrayBinaryOutput extends BinaryOutput
BinaryOutput
backed by a byte array.BinaryOutput.ByteArrayBinaryOutput, BinaryOutput.CCharPointerBinaryOutput
pos
Modifier and Type | Method and Description |
---|---|
static BinaryOutput.ByteArrayBinaryOutput |
create(int initialSize)
Creates a new buffer backed by a byte array.
|
byte[] |
getArray()
Returns the byte array containing the marshalled data.
|
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the byte array starting at offset off . |
void |
write(int b)
Writes the lowest byte of the argument as a single byte value.
|
create, create, create, getPosition, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeTypedValue, writeUTF
public void write(int b)
BinaryOutput
1
.write
in class BinaryOutput
public void write(byte[] b, int off, int len)
BinaryOutput
len
bytes from the byte array
starting at offset off
. The
buffer position is incremented by len
.write
in class BinaryOutput
public byte[] getArray()
public static BinaryOutput.ByteArrayBinaryOutput create(int initialSize)
initialSize
.