public class BoundedInputStream extends InputStream
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() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
available, mark, markSupported, read, reset
public BoundedInputStream(InputStream in, long size)
in
- the stream to read fromsize
- the maximum amount of bytes to readpublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public long skip(long n) throws IOException
skip
in class InputStream
IOException
Copyright © 2020 The Apache Software Foundation. All rights reserved.