RTI Connext Java API  Version 6.1.1

Built-in type consisting of a variable-length array of opaque bytes and a string that is the key. More...

Inheritance diagram for KeyedBytes:
Copyable

Public Member Functions

 KeyedBytes ()
 Default Constructor. More...
 
 KeyedBytes (KeyedBytes src)
 Copy constructor. More...
 
 KeyedBytes (int theLength)
 Constructor that specifies the allocated sizes. More...
 
Object copy_from (Object src)
 Copy src into this object. More...
 

Public Attributes

String key
 Instance key associated with the specified value. More...
 
int length
 Number of bytes to serialize. More...
 
int offset
 Offset from which to start serializing bytes. More...
 
byte [] value
 com.rti.dds.type.builtin.com.rti.dds.type.builtin.Bytes array value. More...
 

Detailed Description

Built-in type consisting of a variable-length array of opaque bytes and a string that is the key.

Constructor & Destructor Documentation

◆ KeyedBytes() [1/3]

Default Constructor.

The default constructor initializes the newly created object with empty key, null value, zero length, and zero offset.

Referenced by KeyedBytes.copy_from(), and KeyedBytes.KeyedBytes().

◆ KeyedBytes() [2/3]

Copy constructor.

Parameters
src<<in>> Object to copy from.
Exceptions
NullPointerExceptionif src is null.

References KeyedBytes.copy_from().

◆ KeyedBytes() [3/3]

KeyedBytes ( int  theLength)

Constructor that specifies the allocated sizes.

After this method is called, key is initialized with the empty string and length and offset are set to zero.

Parameters
theLength<<in>> Size of the allocated bytes array.
Exceptions
IllegalArgumentExceptionif size is negative

References KeyedBytes.key, KeyedBytes.KeyedBytes(), KeyedBytes.length, KeyedBytes.offset, and KeyedBytes.value.

Member Function Documentation

◆ copy_from()

Object copy_from ( Object  src)

Copy src into this object.

This method performs a deep copy of src and it allocates memory for the value if required.

Parameters
src<<in>> Object to copy from.
Returns
this if success. Otherwise, null.
Exceptions
NullPointerExceptionif src is null.

Implements Copyable.

References KeyedBytes.key, KeyedBytes.KeyedBytes(), KeyedBytes.length, KeyedBytes.offset, and KeyedBytes.value.

Referenced by KeyedBytesTypeSupport.get_type_name(), and KeyedBytes.KeyedBytes().

Member Data Documentation

◆ key

◆ length

◆ offset

int offset

Offset from which to start serializing bytes.

The first position of the bytes array has offset 0.

Referenced by KeyedBytes.copy_from(), KeyedBytesTypeSupport.data_to_string(), KeyedBytesTypeSupport.get_type_name(), KeyedBytes.KeyedBytes(), KeyedBytesDataWriter.write(), and KeyedBytesDataWriter.write_w_timestamp().

◆ value