public class MonitoredBufferedInputStream extends BufferedInputStream
getBytesRead()| Modifier and Type | Class and Description |
|---|---|
static interface |
MonitoredBufferedInputStream.ProgressCallback |
| Modifier and Type | Field and Description |
|---|---|
static String |
PROGRESS |
in| Constructor and Description |
|---|
MonitoredBufferedInputStream(InputStream in,
int size,
long contentLength) |
MonitoredBufferedInputStream(InputStream in,
long contentLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
long |
getBytesRead()
Get the number of bytes read since creation or since last resetBytesRead() call.
|
long |
getContentLength() |
int |
getPercentageRead()
Calculate percentage read.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
resetBytesRead()
Resets the number of bytes read.
|
long |
skip(long n) |
available, close, mark, markSupported, resetpublic static final String PROGRESS
public MonitoredBufferedInputStream(InputStream in, long contentLength)
public MonitoredBufferedInputStream(InputStream in, int size, long contentLength)
public void addPropertyChangeListener(PropertyChangeListener listener)
public int read()
throws IOException
read in class BufferedInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class BufferedInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class BufferedInputStreamIOExceptionpublic long getBytesRead()
resetBytesRead()public void resetBytesRead()
public int getPercentageRead()
public long getContentLength()
Copyright © 2019. All rights reserved.