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.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.
This does not have the same guarantees as IOUtil's readFully()...be careful.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.
As with InputStream generally, this does not guarantee reading n bytes.
Use IOUtils' skipFully for that functionality.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()
Copyright © 2010 - 2023 Adobe. All Rights Reserved