public class CountingWritableByteChannel
extends java.lang.Object
implements java.nio.channels.WritableByteChannel
| Constructor and Description | 
|---|
| CountingWritableByteChannel(java.nio.channels.WritableByteChannel delegate,
                           java.util.function.Consumer<java.lang.Integer> bytesWrittenConsumer) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close() | 
| static CountingWritableByteChannel | createWithNoOpConsumer(java.nio.channels.WritableByteChannel delegate) | 
| boolean | isOpen() | 
| int | write(java.nio.ByteBuffer src) | 
public CountingWritableByteChannel(java.nio.channels.WritableByteChannel delegate,
                                   java.util.function.Consumer<java.lang.Integer> bytesWrittenConsumer)
public static CountingWritableByteChannel createWithNoOpConsumer(java.nio.channels.WritableByteChannel delegate)
public int write(java.nio.ByteBuffer src)
          throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic void close()
           throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOException