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.ReadableByteChannel
byteChannel
private ProgressRBCWrapperDelegate
delegate
private long
expectedSize
private long
readSoFar
-
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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.nio.channels.Channel
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfacejava.nio.channels.Channel
-
read
public int read(java.nio.ByteBuffer bb) throws java.io.IOException- Specified by:
read
in interfacejava.nio.channels.ReadableByteChannel
- Throws:
java.io.IOException
-