public class BoundedInputStream
extends java.io.InputStream
Constructor and Description |
---|
BoundedInputStream(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. |
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read(byte[])
method.read
in class java.io.InputStream
b
- 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.InputStream
b
- 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.InputStream
n
- 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.InputStream
java.io.IOException
public void mark(int readLimit)
mark
in class java.io.InputStream
public boolean hasHitBound()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"