public class LimitedInputStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
private java.io.InputStream |
in |
private long |
length |
private long |
read |
| Constructor and Description |
|---|
LimitedInputStream(java.io.InputStream in,
long length) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] buf) |
int |
read(byte[] buf,
int off,
int num) |
long |
skip(long n) |
public LimitedInputStream(java.io.InputStream in,
long length)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int off,
int num)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamCopyright 2004-2015 Wandora Team