public class ExceptionInputStream
extends org.apache.commons.io.input.ProxyInputStream
InputStream wrapper that throws an exception after a configurable number of bytes have
been read from the stream or when the end of the stream is reached.| Modifier and Type | Field and Description |
|---|---|
private int |
remaining |
| Constructor and Description |
|---|
ExceptionInputStream(java.io.InputStream in) |
ExceptionInputStream(java.io.InputStream in,
int maxBytes) |
| Modifier and Type | Method and Description |
|---|---|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
public ExceptionInputStream(java.io.InputStream in)
public ExceptionInputStream(java.io.InputStream in,
int maxBytes)
public int read()
throws java.io.IOException
read in class org.apache.commons.io.input.ProxyInputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class org.apache.commons.io.input.ProxyInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class org.apache.commons.io.input.ProxyInputStreamjava.io.IOException