Class CountingSeekableByteChannel
java.lang.Object
org.apache.beam.sdk.extensions.gcp.util.channels.CountingSeekableByteChannel
- All Implemented Interfaces:
 Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,SeekableByteChannel,WritableByteChannel
- 
Constructor Summary
ConstructorsConstructorDescriptionCountingSeekableByteChannel(SeekableByteChannel delegate, @Nullable Consumer<Integer> bytesReadConsumer, @Nullable Consumer<Integer> bytesWrittenConsumer)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static CountingSeekableByteChannelcreateWithBytesReadConsumer(SeekableByteChannel delegate, Consumer<Integer> bytesReadConsumer) static CountingSeekableByteChannelcreateWithBytesWrittenConsumer(SeekableByteChannel delegate, Consumer<Integer> bytesWrittenConsumer) static CountingSeekableByteChannelcreateWithNoOpConsumer(SeekableByteChannel delegate) booleanisOpen()longposition()position(long newPosition) intread(ByteBuffer dst) longsize()truncate(long size) intwrite(ByteBuffer src)  
- 
Constructor Details
- 
CountingSeekableByteChannel
 
 - 
 - 
Method Details
- 
createWithBytesReadConsumer
public static CountingSeekableByteChannel createWithBytesReadConsumer(SeekableByteChannel delegate, Consumer<Integer> bytesReadConsumer)  - 
createWithBytesWrittenConsumer
public static CountingSeekableByteChannel createWithBytesWrittenConsumer(SeekableByteChannel delegate, Consumer<Integer> bytesWrittenConsumer)  - 
createWithNoOpConsumer
 - 
read
- Specified by:
 readin interfaceReadableByteChannel- Specified by:
 readin interfaceSeekableByteChannel- Throws:
 IOException
 - 
write
- Specified by:
 writein interfaceSeekableByteChannel- Specified by:
 writein interfaceWritableByteChannel- Throws:
 IOException
 - 
position
- Specified by:
 positionin interfaceSeekableByteChannel- Throws:
 IOException
 - 
position
- Specified by:
 positionin interfaceSeekableByteChannel- Throws:
 IOException
 - 
size
- Specified by:
 sizein interfaceSeekableByteChannel- Throws:
 IOException
 - 
truncate
- Specified by:
 truncatein interfaceSeekableByteChannel- Throws:
 IOException
 - 
isOpen
public boolean isOpen() - 
close
- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceChannel- Specified by:
 closein interfaceCloseable- Throws:
 IOException
 
 -