3 posts / 0 new
Last post
Last seen: 4 years 5 months ago
Joined: 08/22/2016
Posts: 2
TypeSupport.serialize causing ArrayIndexOutOfBoundsException

I have an idl file that defines a char[] in a struct as follows:

struct baseDataHdr_S {
octet paramId[16];
short miscHdrBytes;

The autogenerated Java code looks correct, but when sending the Topic I get an error:

java.lang.ArrayIndexOutOfBoundsException: 8
at ...baseDataHdr_STypeSupport.serialize

Looking in the java code the char[] is correctly defined as a char[16], so I'm stumped why indexing char[8] during serialization would cause this exception.

2 posts / 0 new
Last post
Last seen: 5 years 5 months ago
Joined: 05/25/2014
Posts: 6
Serialization / Deserialization of a DDS data sample


How can I take advantage of RTI's APIs in order to convert a data sample object which I read using a DataReader into a byte array and vice versa (in Java)?

I would like to save the binary serialized object to file and then be able to read it again into object. 




5 posts / 0 new
Last post
Last seen: 7 years 3 days ago
Joined: 01/23/2014
Posts: 3
[RESOLVED] Cannot deserialize successfully

I have been working with some examples to serialize and then deserialize an object created via: ::create_data()

Subscribe to RSS - serialize