serialize

3 posts / 0 new
Last post
Offline
Last seen: 3 years 9 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
Offline
Last seen: 4 years 9 months ago
Joined: 05/25/2014
Posts: 6
Serialization / Deserialization of a DDS data sample

Hello,

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. 

 

Thanks

David

Organization:
5 posts / 0 new
Last post
Offline
Last seen: 6 years 4 months 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