-
- 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.
-
-
Constructor Summary
Constructors Constructor Description ForwardingSink(Sink delegate)
-
Method Summary
Modifier and Type Method Description final Sinkdelegate()Sink to which this instance is delegating. voidwrite(Buffer source, long byteCount)Removes {@code byteCount}bytes from{@code source}and appends them to this.voidflush()Pushes all buffered bytes to their final destination. Timeouttimeout()Returns the timeout for this sink. voidclose()Pushes all buffered bytes to their final destination and releases theresources held by this sink. StringtoString()-
-
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.
-
-
-
-