public class BoundedInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
BoundedInputStream(java.io.InputStream in,
long size)
Creates the stream that will at most read the given amount of
bytes from the given stream.
|
public BoundedInputStream(java.io.InputStream in,
long size)
in - the stream to read fromsize - the maximum amount of bytes to readpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStream