|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--java.io.FilterInputStream | +--com.compoze.util.MeteredInputStream
This class provides a FilterInputStream
that performs several
testing/monitoring functions:
Inner Class Summary | |
static class |
MeteredInputStream.RandomInputStream
A NullInputStream for testing purposes. |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
MeteredInputStream(java.io.InputStream in)
Constructor. |
|
MeteredInputStream(java.io.InputStream in,
boolean bCalculateChecksum)
Constructor. |
|
MeteredInputStream(java.io.InputStream in,
int iMaxBytesPerSecond,
boolean bCalculateChecksum)
Constructor. |
Method Summary | |
void |
close()
Closes the InputStream . |
int |
getAverageWriteLength()
Gets the average write length that has been issued. |
double |
getBytesPerSecond()
Gets the number of bytes per second that have been read since the InputStream was instantiated. |
long |
getBytesRead()
Gets the number of bytes that have been read so far. |
long |
getChecksum()
Gets a checksum of all of the data that has been read. |
static void |
main(java.lang.String[] args)
Main. |
int |
read()
Writes a single byte. |
int |
read(byte[] b)
Reads a byte array. |
int |
read(byte[] b,
int iOffset,
int iLength)
Reads a byte array. |
java.lang.String |
toString()
Creates a string representation of the output stream. |
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MeteredInputStream(java.io.InputStream in)
public MeteredInputStream(java.io.InputStream in, boolean bCalculateChecksum)
public MeteredInputStream(java.io.InputStream in, int iMaxBytesPerSecond, boolean bCalculateChecksum)
Method Detail |
public void close() throws java.io.IOException
InputStream
.close
in class java.io.FilterInputStream
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
public int read(byte[] b, int iOffset, int iLength) throws java.io.IOException
read
in class java.io.FilterInputStream
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
public long getBytesRead()
public int getAverageWriteLength()
public double getBytesPerSecond()
InputStream
was instantiated.public long getChecksum()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |