Bytes Class Reference
[Octets Built-in Type]

Built-in type consisting of a variable-length array of opaque bytes. More...

Inheritance diagram for Bytes:

Copyable

List of all members.

Public Member Functions

 Bytes ()
 Default Constructor.
 Bytes (Bytes src)
 Copy constructor.
 Bytes (int size)
 Constructor that specifies the size of the allocated bytes array.
Object copy_from (Object src)
 Copy src into this object.

Public Attributes

int length
 Number of bytes to serialize.
int offset
 Offset from which to start serializing bytes .
byte[] value
 com.rti.dds.type.builtin.Bytes array value.


Detailed Description

Built-in type consisting of a variable-length array of opaque bytes.

Constructor & Destructor Documentation

Bytes (  ) 

Default Constructor.

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

Bytes ( Bytes  src  ) 

Copy constructor.

Parameters:
src <<in>> Object to copy from.
Exceptions:
NullPointerException if src is null.

Bytes ( int  size  ) 

Constructor that specifies the size of the allocated bytes array.

After this method is called, length and offset are set to zero.

Parameters:
size <<in>> Size of the allocated bytes array.
Exceptions:
IllegalArgumentException if size is negative


Member Function Documentation

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:
NullPointerException if src is null.

Implements Copyable.


Member Data Documentation

int length

Number of bytes to serialize.

int offset

Offset from which to start serializing bytes .

The first position of the bytes array has offset 0.

byte [] value


RTI Connext Java API Version 4.5f Copyright © 17 Mar 2012 Real-Time Innovations, Inc