Serializing Classes in 11.6

Posted by tbergman on 02-Nov-2015 13:55

I was trying out the new serialization features in 11.6. Works fine serializing to a file, either binary or Json.

Is there a way to serialize to a memptr? I realize I can go to a file and then use COPY-LOB but that's rather inelegant.

Thanks,

Tom

All Replies

Posted by Fernando Souza on 02-Nov-2015 14:09

No, not directly. The data is passed as a memptr to the OutputStream object, so you could potentially subclass the OutputStream class and then have your own stream object that constructs a memptr with the data that is passed in by the serializer. But I am not sure that is more elegant.

Posted by Simon L. Prinsloo on 03-Nov-2015 01:22

I think the sub-class idea is better than doing it via the file system, as you will skip the file system IO.

This thread is closed