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.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.InputStreampublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic long getBytesRemaining()
Copyright © 2010 - 2023 Adobe. All Rights Reserved