public class CountedInputStream extends FilterInputStream
in
Constructor and Description |
---|
CountedInputStream(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.
|
available, close, mark, markSupported, reset
public CountedInputStream(InputStream instrm, int count)
instrm
- The InputStream being countedcount
- The number of bytes to be allowedpublic int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.