Menu

#17 AbstractCsvWriter not FileLock friendly

2.0.0-beta-1
closed
None
5
2012-09-16
2010-07-29
rob walker
No

Using AbstractCsvWriter and CsvMapWriter doesn't work well in an environment where file locks are used. The only way to flush the data is via the close() method, which closes the stream and invalidates any locks.

A separate flush() method would allow the data to be flushed to disk, and the lock to be released prior to the stream being closed.

Discussion

  • Ryan Beesley

    Ryan Beesley - 2010-10-01

    I concur, needs flush() for the outStream. It was simple enough to add, requiring a prototype,

    void flush() throws IOException;

    in icsv*.java,

    public void flush () throws IOException { outStream.flush(); }

    in abstractcsvwriter.java, and an overriden function,

    @Override public void flush() throws IOException { super .flush(); }

    in csv*.java.

    The AbstractCsvWriter should extend Writer so that it can be used as any Writer stream to more easily allow chained streams.

     
  • James Bassett

    James Bassett - 2011-11-14

    This will be available in the upcoming release!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.