Package ubic.gemma.core.util
Class ProgressInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- ubic.gemma.core.util.ProgressInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
@ParametersAreNonnullByDefault public class ProgressInputStream extends FilterInputStream
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description ProgressInputStream(InputStream in, Object what, String logCategory, long maxSizeInBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read()
int
read(byte[] b, int off, int len)
long
skip(long n)
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset
-
-
-
-
Constructor Detail
-
ProgressInputStream
public ProgressInputStream(InputStream in, Object what, String logCategory, long maxSizeInBytes)
- Parameters:
what
- an object describing what is being processed, it will be used for logging purposeslogCategory
- a log category to report progress tomaxSizeInBytes
- the maximum size in bytes
-
-
Method Detail
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
public int read() throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-
-