|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.FastByteBufferWriter
public final class FastByteBufferWriter
A writer to a byte buffer. The main purpose of this class is to encapsulate the writing offset.
| Constructor Summary | |
|---|---|
FastByteBufferWriter(FastByteBuffer buffer)
Instantiation. |
|
FastByteBufferWriter(FastByteBuffer buffer,
int initialWriteOffset)
Instantiation. |
|
| Method Summary | |
|---|---|
int |
getCurrentWriteOffset()
Gets the current write offset. |
void |
put(byte value)
Puts the given byte into the buffet. |
void |
put(byte[] array)
Copies the given array into the byte buffer, starting at the current index. |
void |
put(byte[] array,
int length)
Copies the specified number of bytes from the given array into the byte buffer, starting at the current index. |
void |
putDouble(double value)
Write the given double into the byte buffer. |
void |
putInt(int value)
Write the given integer into the byte buffer. |
void |
putLong(long value)
Write the given long into the byte buffer. |
void |
putString(String value)
Write the given string encoded as UTF-8 into the byte buffer. |
void |
reset()
Resets the write offset to 0. |
void |
seek(int offset)
Sets the write offset to the given value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FastByteBufferWriter(FastByteBuffer buffer)
buffer - the byte buffer to be written to
public FastByteBufferWriter(FastByteBuffer buffer,
int initialWriteOffset)
buffer - the byte buffer to be written toinitialWriteOffset - the initial offset| Method Detail |
|---|
public int getCurrentWriteOffset()
public void seek(int offset)
offset - target offsetpublic void reset()
public void putDouble(double value)
value - The value to write.public void putLong(long value)
value - The value to write.public void putInt(int value)
value - The value to write.public void putString(String value)
value - The value to write.public void put(byte[] array)
array - The array.
public void put(byte[] array,
int length)
array - The array.length - The number of bytes that should be copied into the buffer.public void put(byte value)
value - The byte to put into the buffer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||