public class RepeatableFileInputStream extends InputStream
| 构造器和说明 |
|---|
RepeatableFileInputStream(File file)
Creates a repeatable input stream based on a file.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
available() |
void |
close() |
File |
getFile()
Returns the File this stream is reading data from.
|
InputStream |
getWrappedInputStream() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] arg0,
int arg1,
int arg2) |
void |
reset()
Resets the input stream to the last mark point, or the beginning of the
stream if there is no mark point, by creating a new FileInputStream based
on the underlying file.
|
long |
skip(long n) |
readpublic RepeatableFileInputStream(File file) throws FileNotFoundException
file - The file from which this input stream reads data.FileNotFoundException - If the specified file doesn't exist, or can't be opened.public File getFile()
public void reset()
throws IOException
reset 在类中 InputStreamIOException - when the FileInputStream cannot be re-created.public boolean markSupported()
markSupported 在类中 InputStreamInputStream.markSupported()public void mark(int readlimit)
mark 在类中 InputStreamInputStream.mark(int)public int available()
throws IOException
available 在类中 InputStreamIOExceptionInputStream.available()public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 InputStreamIOExceptionInputStream.close()public int read()
throws IOException
read 在类中 InputStreamIOExceptionInputStream.read()public long skip(long n)
throws IOException
skip 在类中 InputStreamIOExceptionpublic int read(byte[] arg0,
int arg1,
int arg2)
throws IOException
read 在类中 InputStreamIOExceptionInputStream.read(byte[], int, int)public InputStream getWrappedInputStream()
Copyright © 2016-2017. All Rights Reserved.