Hi, I'm still trying to use the new serialization methods but continue running into problems.
Last time we discussed that I need to know the original type system when I want to deserialize a format 6 binary CAS into a CAS. So when I serialize the CAS now, I first write a header, then I dump the type system into my output stream, and then the binary CAS using serializeWithCompression(cas, outputStream, cas.getTypeSystem()); When I read the data, I check for my header. If it is there, I read the type system. Now I wanted to call deserializeCAS(cas, inputStream, typeSystem, null); Unfortunately, that fails. The reason is, that this signature of deserializeCAS immediately uses the BinaryCasSerDes6 to read data from the input stream. However, serializeWithCompression writes a header before the data that BinaryCasSerDes6. This header is read by a deserializeCAS(cas, inputStream), but in this signature, I have no way of specifying the original type system. Of course I can copy the whole header checking code from CASImpl, but I don't think that is a good solution. I think the deserializeCAS methods that UIMA provides should either all deal with the header that the serializeWithCompression methods write, or none should. Maybe a solution for this dilemma is something that could also go into a 2.4.2 release. Cheers, -- Richard
