Package aQute.bnd.http
Class ProgressWrappingStream
- java.lang.Object
-
- java.io.InputStream
-
- aQute.bnd.http.ProgressWrappingStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ProgressWrappingStream extends java.io.InputStream
-
-
Constructor Summary
Constructors Constructor Description ProgressWrappingStream(java.io.InputStream delegate, java.lang.String name, int size, ProgressPlugin.Task task, long timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()private booleanisTimeout()intread()intread(byte[] buffer)intread(byte[] buffer, int offset, int length)intupdate(int count)
-
-
-
Field Detail
-
delegate
private java.io.InputStream delegate
-
task
private ProgressPlugin.Task task
-
size
private int size
-
reported
private int reported
-
read
private int read
-
timeout
private long timeout
-
deadline
private long deadline
-
closed
private final java.util.concurrent.atomic.AtomicBoolean closed
-
-
Constructor Detail
-
ProgressWrappingStream
public ProgressWrappingStream(java.io.InputStream delegate, java.lang.String name, int size, ProgressPlugin.Task task, long timeout)
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
isTimeout
private boolean isTimeout() throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read(byte[] buffer) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] buffer, int offset, int length) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
update
public int update(int count) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-