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, getFD
mark, markSupported, reset
public LimitingFileInputStream(File file, long limit) throws FileNotFoundException
FileNotFoundException
public LimitingFileInputStream(FileDescriptor fdObj, long limit)
public LimitingFileInputStream(String name, long limit) throws FileNotFoundException
FileNotFoundException
public int read() throws IOException
read
in class FileInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FileInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FileInputStream
IOException
public long skip(long n) throws IOException
skip
in class FileInputStream
IOException
public int available() throws IOException
available
in class FileInputStream
IOException
public long getLimit()
public FileChannel getChannel()
FileChannel
which is limited also in the sizegetChannel
in class FileInputStream
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.