public class ByteBufferWriteable extends Object implements IBinaryWriteable
| Constructor and Description |
|---|
ByteBufferWriteable(ByteBuffer buf)
Creates new
ByteBufferWriteable that wraps the given ByteBuffer. |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
flush.
|
ByteOrder |
order()
order.
|
void |
order(ByteOrder order)
order.
|
long |
position()
Returns the buffer position.
|
void |
position(long newPosition)
Sets the buffer position.
|
void |
put(byte value)
put.
|
void |
put(byte[] src)
put.
|
void |
put(byte[] src,
int offset,
int length)
put.
|
void |
put(ByteBuffer src)
Put n bytes from the remaining of the byte array.
|
void |
put(ByteBuffer src,
int length)
Put n bytes from the remaining of the byte buffer.
|
void |
putDouble(double value)
putDouble.
|
void |
putFloat(float value)
putFloat.
|
void |
putInt(int value)
putInt.
|
void |
putLong(long value)
putLong.
|
void |
putShort(short value)
putShort.
|
public ByteBufferWriteable(ByteBuffer buf)
ByteBufferWriteable that wraps the given ByteBuffer.public void flush()
IBinaryWriteableflush.
flush in interface IBinaryWriteablepublic ByteOrder order()
IBinaryWriteableorder.
order in interface IBinaryWriteableByteOrder object.public void order(ByteOrder order)
IBinaryWriteableorder.
order in interface IBinaryWriteableorder - a ByteOrder object.public long position()
throws IOException
IOExceptionpublic void position(long newPosition)
throws IOException
IOExceptionpublic void put(byte value)
IBinaryWriteableput.
put in interface IBinaryWriteablevalue - a byte.public void put(byte[] src)
IBinaryWriteableput.
put in interface IBinaryWriteablesrc - an array of byte.public void put(byte[] src,
int offset,
int length)
IBinaryWriteableput.
put in interface IBinaryWriteablesrc - an array of byte.offset - a int.length - a int.public void put(ByteBuffer src)
IBinaryWriteableput in interface IBinaryWriteablesrc - a ByteBuffer object.public void put(ByteBuffer src, int length)
IBinaryWriteableput in interface IBinaryWriteablesrc - a ByteBuffer object.length - a int.public void putDouble(double value)
IBinaryWriteableputDouble.
putDouble in interface IBinaryWriteablevalue - a double.public void putFloat(float value)
IBinaryWriteableputFloat.
putFloat in interface IBinaryWriteablevalue - a float.public void putInt(int value)
IBinaryWriteableputInt.
putInt in interface IBinaryWriteablevalue - a int.public void putLong(long value)
IBinaryWriteableputLong.
putLong in interface IBinaryWriteablevalue - a long.public void putShort(short value)
IBinaryWriteableputShort.
putShort in interface IBinaryWriteablevalue - a short.Copyright © 2026. All rights reserved.