public class MonitoredInputStream
extends java.io.BufferedInputStream
Modifier and Type | Field and Description |
---|---|
protected long |
maxlength |
protected long |
readlength |
static java.lang.String |
REVISION |
protected long |
startingTime |
Constructor and Description |
---|
MonitoredInputStream(java.io.InputStream stream,
int size,
long maxlength) |
Modifier and Type | Method and Description |
---|---|
long |
getMaxLength()
Returns the maxLength of the inputStream
|
long |
getSpentTime(boolean elapse)
Return the time spent into this output stream
|
long |
getStatus(boolean absolute,
boolean done)
Return the status of the stream.
|
int |
read()
Delegate Read to super class, count charactere read.
|
int |
read(byte[] b,
int off,
int len)
Delegate Read to super class, count charactere read.
|
public static final java.lang.String REVISION
protected long maxlength
protected long readlength
protected long startingTime
public MonitoredInputStream(java.io.InputStream stream, int size, long maxlength)
public int read() throws java.io.IOException
read
in class java.io.BufferedInputStream
java.io.IOException
InputStream.read()
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.BufferedInputStream
java.io.IOException
InputStream.read(byte[], int, int)
public long getStatus(boolean absolute, boolean done)
absolute
- if return an absolute value or percentagedone
- if return the available byte or done bytespublic long getSpentTime(boolean elapse)
elapse
- true return time spent, false return time to spentpublic long getMaxLength()
Copyright © 2001-2010 Jalios SA. All Rights Reserved.