Package com.github.tadukoo.engine
Class ProgressReadableByteChannelWrapper
java.lang.Object
com.github.tadukoo.engine.ProgressReadableByteChannelWrapper
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.ReadableByteChannel
public class ProgressReadableByteChannelWrapper
extends java.lang.Object
implements java.nio.channels.ReadableByteChannel
-
Field Summary
Fields Modifier and Type Field Description private java.nio.channels.ReadableByteChannelbyteChannelprivate ProgressRBCWrapperDelegatedelegateprivate longexpectedSizeprivate longreadSoFar -
Constructor Summary
Constructors Constructor Description ProgressReadableByteChannelWrapper(java.nio.channels.ReadableByteChannel byteChannel, ProgressRBCWrapperDelegate delegate, long expectedSize) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
byteChannel
private java.nio.channels.ReadableByteChannel byteChannel -
delegate
-
expectedSize
private long expectedSize -
readSoFar
private long readSoFar
-
-
Constructor Details
-
ProgressReadableByteChannelWrapper
public ProgressReadableByteChannelWrapper(java.nio.channels.ReadableByteChannel byteChannel, ProgressRBCWrapperDelegate delegate, long expectedSize)
-
-
Method Details
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
read
public int read(java.nio.ByteBuffer bb) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Throws:
java.io.IOException
-