public final class ProgressInputStream
extends java.io.FilterInputStream
| Constructor and Description |
|---|
ProgressInputStream(java.io.InputStream inputStream)
Creates a new progress input stream that reads from the given input
stream
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTotalNumBytesReadConsumer(java.util.function.LongConsumer consumer)
Add the given consumer to be informed about the total number of
bytes that have been read
|
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
removeTotalNumBytesReadConsumer(java.util.function.LongConsumer consumer)
Remove the given consumer
|
void |
reset() |
long |
skip(long n) |
public ProgressInputStream(java.io.InputStream inputStream)
inputStream - The input streampublic void addTotalNumBytesReadConsumer(java.util.function.LongConsumer consumer)
consumer - The consumerpublic void removeTotalNumBytesReadConsumer(java.util.function.LongConsumer consumer)
consumer - The consumerpublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.FilterInputStreampublic void reset()
throws java.io.IOException
reset in class java.io.FilterInputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.FilterInputStreamCopyright © 2022. All Rights Reserved.