Class TransactionalOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.moeaframework.analysis.store.TransactionalOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public abstract class TransactionalOutputStream extends FilterOutputStream
Output stream with a transaction mechanism requiring one to call commit() before the content is stored. The typical use is:

   try (TransactionalOutputStream out = blob.openOutputStream()) {
       out.write(...);
       out.commit();
   }
 
  • Constructor Details

    • TransactionalOutputStream

      public TransactionalOutputStream(OutputStream out)
      Constructs a transactional output stream.
      Parameters:
      out - the temporary output stream, where content is written before it is committed
  • Method Details