Package 

Class ForwardingSink

  • All Implemented Interfaces:
    com.mobwith.httpmodule.Sink , java.io.Closeable , java.io.Flushable , java.lang.AutoCloseable

    
    public abstract class ForwardingSink
     implements Sink
                        

    A Sink which forwards calls to another. Useful for subclassing.

    • Method Summary

      Modifier and Type Method Description
      final Sink delegate() Sink to which this instance is delegating.
      void write(Buffer source, long byteCount) Removes {@code byteCount} bytes from {@code source} and appends them to this.
      void flush() Pushes all buffered bytes to their final destination.
      Timeout timeout() Returns the timeout for this sink.
      void close() Pushes all buffered bytes to their final destination and releases theresources held by this sink.
      String toString()
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class java.io.Flushable

        flush
      • Methods inherited from class java.lang.Object

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

      • ForwardingSink

        ForwardingSink(Sink delegate)
    • Method Detail

      • write

         void write(Buffer source, long byteCount)

        Removes {@code byteCount} bytes from {@code source} and appends them to this.

      • flush

         void flush()

        Pushes all buffered bytes to their final destination.

      • close

         void close()

        Pushes all buffered bytes to their final destination and releases theresources held by this sink. It is an error to write a closed sink. It issafe to close a sink more than once.