public class CountedInputStream
extends java.io.FilterInputStream
| Constructor and Description |
|---|
CountedInputStream(java.io.InputStream instrm,
int count) |
| Modifier and Type | Method and Description |
|---|---|
int |
read()
Reads a single byte from the stream and decrements
the count of remaining bytes.
|
int |
read(byte[] b)
Reads some number of bytes from the input stream and
stores them into the buffer array b.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the input stream
into an array of bytes.
|
long |
skip(long n)
Skips n bytes.
|
public CountedInputStream(java.io.InputStream instrm,
int count)
instrm - The InputStream being countedcount - The number of bytes to be allowedpublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOException