public class ProgressWrappingStream
extends java.io.InputStream
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicBoolean |
closed |
private long |
deadline |
private java.io.InputStream |
delegate |
private int |
read |
private int |
reported |
private int |
size |
private ProgressPlugin.Task |
task |
private long |
timeout |
Constructor and Description |
---|
ProgressWrappingStream(java.io.InputStream delegate,
java.lang.String name,
int size,
ProgressPlugin.Task task,
long timeout) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private boolean |
isTimeout() |
int |
read() |
int |
read(byte[] buffer) |
int |
read(byte[] buffer,
int offset,
int length) |
int |
update(int count) |
private java.io.InputStream delegate
private ProgressPlugin.Task task
private int size
private int reported
private int read
private long timeout
private long deadline
private final java.util.concurrent.atomic.AtomicBoolean closed
public ProgressWrappingStream(java.io.InputStream delegate, java.lang.String name, int size, ProgressPlugin.Task task, long timeout)
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
private boolean isTimeout() throws java.io.IOException
java.io.IOException
public int read(byte[] buffer) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int update(int count) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException