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

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.SerializableType
      extended by com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.SerializableBLOB
All Implemented Interfaces:
com.kuka.common.IDataEquatable, ISerializableType, Cloneable

public final class SerializableBLOB
extends SerializableType

Serializable class for a byte 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.

Constructor Summary
SerializableBLOB()
          Creates a new empty string wrapper class.
SerializableBLOB(byte[] value)
          Creates a new byte array wrapper class.
SerializableBLOB(byte[] value, int length)
          Generates a blob of the given length and copies the given value into the new array.
 
Method Summary
 ISerializableType clone()
          Creates a copy of this serializable type.
static SerializableBLOB createFromLongInteger(long value)
          Method to create a serializable blob from a long integer value.
 void fromByteBuffer(FastByteBuffer buffer, int startIndex)
          Deserializes a type from a byte buffer.
 void fromString(String value)
          Deserializes the type from a String representation.
 int[] getDimensions()
          Gets the 4-dimensional integer array describing the order of this type in each of the four possible dimensions.
 int getLength()
          Gets the length in bytes of this type.
 MessageParameterType getParameterType()
          Gets the message type identifier of the type.
 TypeIdentifier getTypeIdentifier()
          Gets the Sunrise type identifier of the type.
 byte[] getValue()
          Gets the raw value of the serializable type.
 boolean hasSameDataAs(Object obj)
          
 long longValue()
          Returns the content of the BLOB as 64 bit little endian integer (Java type long) value.
 void setValue(Object value)
          Sets the value for this type.
 int toByteBuffer(FastByteBuffer buffer, int startIndex)
          Serializes the type in a byte buffer.
 String toString()
          
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.SerializableType
getParameterName, hasParameterNameSet, setParameterName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerializableBLOB

public SerializableBLOB()
Creates a new empty string wrapper class.

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.

SerializableBLOB

public SerializableBLOB(byte[] value,
                        int length)
Generates a blob of the given length and copies the given value into the new array. The value length must be less or equal than the given length.

Parameters:
value - The value for the blob.
length - The length of the blob.
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.

SerializableBLOB

public SerializableBLOB(byte[] value)
Creates a new byte array wrapper class.

Parameters:
value - The value of the wrapper class.
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

setValue

public void setValue(Object value)
Sets the value for this type. Must be compatible with the type.

Parameters:
value - The value for this type. Must be compatible with the type. The value should never be null. Each subclass must check this.
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.

fromByteBuffer

public void fromByteBuffer(FastByteBuffer buffer,
                           int startIndex)
Deserializes a type from a byte buffer.

Parameters:
buffer - The byte buffe from which the value should be deserialized.
startIndex - The start index of the deserialization.
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.

toByteBuffer

public int toByteBuffer(FastByteBuffer buffer,
                        int startIndex)
Serializes the type in a byte buffer.

Parameters:
buffer - The byte buffer to which the value should be serialized.
startIndex - The start index for the serialization.
Returns:
The length in bytes of the serialized type.
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.

getValue

public byte[] getValue()
Gets the raw value of the serializable type.

Returns:
The raw value of the serializable type.
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.

getParameterType

public MessageParameterType getParameterType()
Gets the message type identifier of the type.

Returns:
The message type identifier of the type.
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.

getLength

public int getLength()
Gets the length in bytes of this type.

Returns:
The length in bytes of this type.
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.

getTypeIdentifier

public TypeIdentifier getTypeIdentifier()
Gets the Sunrise type identifier of the type.

Returns:
The Sunrise type identifier of the type.
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.

getDimensions

public int[] getDimensions()
Gets the 4-dimensional integer array describing the order of this type in each of the four possible dimensions.

Returns:
The 4-dimensional integer array describing the order of this type in each of the four possible dimensions.
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.

toString

public String toString()

Overrides:
toString in class Object
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.

fromString

public void fromString(String value)
Deserializes the type from a String representation.

Parameters:
value - The string representation for the type.
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.

clone

public ISerializableType clone()
Creates a copy of this serializable type.

Specified by:
clone in interface ISerializableType
Specified by:
clone in class SerializableType
Returns:
A copy of this serializable type.
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.

hasSameDataAs

public boolean hasSameDataAs(Object obj)

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.

createFromLongInteger

public static SerializableBLOB createFromLongInteger(long value)
Method to create a serializable blob from a long integer value. The value will be serialized as 64 bit little endian value.

Parameters:
value - Long integer value to serialize.
Returns:
Serializable blob with serialized long integer value.
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.

longValue

public long longValue()
Returns the content of the BLOB as 64 bit little endian integer (Java type long) value.

Returns:
the long value
Throws:
IllegalStateException - if the byte buffer does not contain exactly 8 bytes (64 bits)
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.