public class LimitingFileInputStream extends FileInputStream
| Constructor and Description |
|---|
LimitingFileInputStream(FileDescriptor fdObj,
long limit) |
LimitingFileInputStream(File file,
long limit) |
LimitingFileInputStream(String name,
long limit) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
FileChannel |
getChannel()
Return a READ-ONLY
FileChannel which is limited also in the size |
long |
getLimit()
Return the limit
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
close, finalize, getFDmark, markSupported, resetpublic LimitingFileInputStream(File file, long limit) throws FileNotFoundException
FileNotFoundExceptionpublic LimitingFileInputStream(FileDescriptor fdObj, long limit)
public LimitingFileInputStream(String name, long limit) throws FileNotFoundException
FileNotFoundExceptionpublic int read()
throws IOException
read in class FileInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FileInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FileInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FileInputStreamIOExceptionpublic int available()
throws IOException
available in class FileInputStreamIOExceptionpublic long getLimit()
public FileChannel getChannel()
FileChannel which is limited also in the sizegetChannel in class FileInputStreamCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.