Class CountingWritableByteChannel
java.lang.Object
org.apache.beam.sdk.extensions.gcp.util.channels.CountingWritableByteChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,WritableByteChannel
-
Constructor Summary
ConstructorsConstructorDescriptionCountingWritableByteChannel(WritableByteChannel delegate, Consumer<Integer> bytesWrittenConsumer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static CountingWritableByteChannelcreateWithNoOpConsumer(WritableByteChannel delegate) booleanisOpen()intwrite(ByteBuffer src)
-
Constructor Details
-
CountingWritableByteChannel
public CountingWritableByteChannel(WritableByteChannel delegate, Consumer<Integer> bytesWrittenConsumer)
-
-
Method Details
-
createWithNoOpConsumer
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-