public class BoundedInputStream extends FilterInputStream
in| Constructor and Description |
|---|
BoundedInputStream(InputStream in,
long size)
Creates the stream that will at most read the given amount of
bytes from the given stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getBytesRemaining() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
available, mark, markSupported, read, resetpublic BoundedInputStream(InputStream in, long size)
in - the stream to read fromsize - the maximum amount of bytes to readpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreampublic long getBytesRemaining()
public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionCopyright © 2002–2025. All rights reserved.