Class FastContentOutputStream

  • All Implemented Interfaces:
    com.google.common.util.concurrent.ListenableFuture<Boolean>, Closeable, Flushable, AutoCloseable, Future<Boolean>

    public class FastContentOutputStream
    extends OutputStream
    implements com.google.common.util.concurrent.ListenableFuture<Boolean>

    This class extends the AbstractContentOutputStream, and forwards all write() and close() calls to a FastContentWriter. This means that once OutputStream.close() has been called, the asynchronous completion of all pending operations can be awaited using the ListenableFuture interface of this class. Any asynchronous failure will be rethrown when calling either of the get() methods on this class.

    Please notice that the Future implementation of this class will NEVER complete unless OutputStream.close() has been called.

    Author:
    Simon Thoresen Hult