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.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getBytesRemaining() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
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.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public long getBytesRemaining()
Copyright © 2010 - 2023 Adobe. All Rights Reserved