Class CloseableByteSourceFromOutputStreamBuilder

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public abstract class CloseableByteSourceFromOutputStreamBuilder
    extends java.io.OutputStream
    Output stream that creates a CloseableByteSource from the data that was written to it. Calling OutputStream.close() is optional as build() will also close the output stream.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract CloseableByteSource build()
      Creates the source from the data that has been written to the stream.
      • Methods inherited from class java.io.OutputStream

        close, flush, nullOutputStream, write, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CloseableByteSourceFromOutputStreamBuilder

        public CloseableByteSourceFromOutputStreamBuilder()
    • Method Detail

      • build

        public abstract CloseableByteSource build()
                                           throws java.io.IOException
        Creates the source from the data that has been written to the stream. No more data can be written to the output stream after this method has been called.
        Returns:
        a source that will provide the data that was written to the stream before this method is invoked; where this data is stored is not specified by this interface
        Throws:
        java.io.IOException - failed to build the byte source