com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib
Class FastByteBufferWriter

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.FastByteBufferWriter

public final class FastByteBufferWriter
extends Object

A writer to a byte buffer. The main purpose of this class is to encapsulate the writing offset.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

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

FastByteBufferWriter

public FastByteBufferWriter(FastByteBuffer buffer)
Instantiation.

Parameters:
buffer - the byte buffer to be written to
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

FastByteBufferWriter

public FastByteBufferWriter(FastByteBuffer buffer,
                            int initialWriteOffset)
Instantiation.

Parameters:
buffer - the byte buffer to be written to
initialWriteOffset - the initial offset
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
Method Detail

getCurrentWriteOffset

public int getCurrentWriteOffset()
Gets the current write offset. This is increased when a put operation is performed.

Returns:
The current buffer write offset.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

seek

public void seek(int offset)
Sets the write offset to the given value.

Parameters:
offset - target offset
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

reset

public void reset()
Resets the write offset to 0.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

putDouble

public void putDouble(double value)
Write the given double into the byte buffer.

Parameters:
value - The value to write.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

putLong

public void putLong(long value)
Write the given long into the byte buffer.

Parameters:
value - The value to write.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

putInt

public void putInt(int value)
Write the given integer into the byte buffer.

Parameters:
value - The value to write.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

putString

public void putString(String value)
Write the given string encoded as UTF-8 into the byte buffer. Adds the terminating 0 to the written string.

Parameters:
value - The value to write.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

put

public void put(byte[] array)
Copies the given array into the byte buffer, starting at the current index.

Parameters:
array - The array.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

put

public 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.

Parameters:
array - The array.
length - The number of bytes that should be copied into the buffer.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

put

public void put(byte value)
Puts the given byte into the buffet.

Parameters:
value - The byte to put into the buffer.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.