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 TypeMethodDescriptionvoid
close()
static CountingWritableByteChannel
createWithNoOpConsumer
(WritableByteChannel delegate) boolean
isOpen()
int
write
(ByteBuffer src)
-
Constructor Details
-
CountingWritableByteChannel
public CountingWritableByteChannel(WritableByteChannel delegate, Consumer<Integer> bytesWrittenConsumer)
-
-
Method Details
-
createWithNoOpConsumer
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-