|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.ka2ddo.yaac.io.CountingInputStream
public final class CountingInputStream
InputStream to count the number of bytes read from the input, so as to drive a progress bar.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
CountingInputStream(java.io.InputStream in)
Create a CountingInputStream wrapped around the specified InputStream. |
Method Summary | |
---|---|
long |
getByteCount()
Get the number of bytes passed through this stream (so far). |
void |
mark(int readlimit)
Override mark to do nothing. |
boolean |
markSupported()
Override the markSupported operation. |
int |
read()
Read a byte. |
int |
read(byte[] b)
Read an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Read bytes into an offset array. |
void |
reset()
Override reset to reset the byte count. |
long |
skip(long n)
Skip some bytes. |
Methods inherited from class java.io.FilterInputStream |
---|
available, close |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CountingInputStream(java.io.InputStream in)
in
- the InputStream to count.Method Detail |
---|
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
public void mark(int readlimit)
mark
in class java.io.FilterInputStream
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
java.io.IOException
public final int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public final int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public final int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public final long skip(long n) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
public final long getByteCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |