private class CommonsDigester.SimpleBoundedInputStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
private static int |
EOF |
(package private) boolean |
hitBound |
private java.io.InputStream |
in |
private long |
max |
private long |
pos |
| Modifier | Constructor and Description |
|---|---|
private |
SimpleBoundedInputStream(long max,
java.io.InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasHitBound() |
void |
mark(int readLimit) |
int |
read() |
int |
read(byte[] b)
Invokes the delegate's
read(byte[]) method. |
int |
read(byte[] b,
int off,
int len)
Invokes the delegate's
read(byte[], int, int) method. |
void |
reset() |
long |
skip(long n)
Invokes the delegate's
skip(long) method. |
private static final int EOF
private final long max
private final java.io.InputStream in
private long pos
boolean hitBound
private SimpleBoundedInputStream(long max,
java.io.InputStream in)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read(byte[]) method.read in class java.io.InputStreamb - the buffer to read the bytes intojava.io.IOException - if an I/O error occurspublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read(byte[], int, int) method.read in class java.io.InputStreamb - the buffer to read the bytes intooff - The start offsetlen - The number of bytes to readjava.io.IOException - if an I/O error occurspublic long skip(long n)
throws java.io.IOException
skip(long) method.skip in class java.io.InputStreamn - the number of bytes to skipjava.io.IOException - if an I/O error occurspublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readLimit)
mark in class java.io.InputStreampublic boolean hasHitBound()