public abstract class ForwardingSink extends Object implements Sink
Sink which forwards calls to another. Useful for subclassing.| Constructor and Description | 
|---|
| ForwardingSink(Sink delegate) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Pushes all buffered bytes to their final destination and releases the
 resources held by this sink. | 
| Sink | delegate()Sinkto which this instance is delegating. | 
| void | flush()Pushes all buffered bytes to their final destination. | 
| Timeout | timeout()Returns the timeout for this sink. | 
| String | toString() | 
| void | write(Buffer source,
     long byteCount)Removes  byteCountbytes fromsourceand appends them to this. | 
public ForwardingSink(Sink delegate)
public void write(Buffer source, long byteCount) throws IOException
SinkbyteCount bytes from source and appends them to this.write in interface SinkIOExceptionpublic void flush()
           throws IOException
Sinkflush in interface Flushableflush in interface SinkIOExceptionpublic Timeout timeout()
Sinkpublic void close()
           throws IOException
Sinkclose in interface Closeableclose in interface AutoCloseableclose in interface SinkIOExceptionCopyright © 2017. All rights reserved.