uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject CasIOUtils class - ZIP file scenario
Date Wed, 03 Aug 2016 16:38:12 GMT
In the current design, I think the following code does not make much sense:

    // To support writing to ZIPs, the type system must be written separately from the CAS
    if (typeOS != null && !typeSystemWritten) {
      writeTypeSystem(aCas, typeOS);
      typeSystemWritten = true;

Originally, this was meant to support writing to ZIPs. But in the original code, the OutputStream
was the obtained later, i.e. inside the writeTypeSystem() call. It is not possible to obtain
an OutputStream for a "future" position in the ZIP file.

So I wonder if this part of the code should be changed such that a type system is always written
to the TS output stream if that stream is null.

At least the comment should be removed.

-- Richard
View raw message