public final class CountingInputStream
extends java.io.FilterInputStream
| Constructor and Description |
|---|
CountingInputStream(java.io.InputStream in)
Create a CountingInputStream wrapped around the specified InputStream.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public CountingInputStream(java.io.InputStream in)
in - the InputStream to count.public boolean markSupported()
markSupported in class java.io.FilterInputStreampublic void mark(int readlimit)
mark in class java.io.FilterInputStreampublic void reset()
reset in class java.io.FilterInputStreampublic final int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic final int read(byte[] b)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic final int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic final long skip(long n)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOExceptionpublic final long getByteCount()