Class CountingReadableByteChannel
java.lang.Object
org.apache.beam.sdk.extensions.gcp.util.channels.CountingReadableByteChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,ReadableByteChannel
-
Constructor Summary
ConstructorsConstructorDescriptionCountingReadableByteChannel
(ReadableByteChannel delegate, Consumer<Integer> bytesReadConsumer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static CountingReadableByteChannel
createWithNoOpConsumer
(ReadableByteChannel delegate) boolean
isOpen()
int
read
(ByteBuffer dst)
-
Constructor Details
-
CountingReadableByteChannel
public CountingReadableByteChannel(ReadableByteChannel delegate, Consumer<Integer> bytesReadConsumer)
-
-
Method Details
-
createWithNoOpConsumer
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-