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) |
read
public 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
在类中 InputStream
IOException
- when the FileInputStream cannot be re-created.public boolean markSupported()
markSupported
在类中 InputStream
InputStream.markSupported()
public void mark(int readlimit)
mark
在类中 InputStream
InputStream.mark(int)
public int available() throws IOException
available
在类中 InputStream
IOException
InputStream.available()
public void close() throws IOException
close
在接口中 Closeable
close
在接口中 AutoCloseable
close
在类中 InputStream
IOException
InputStream.close()
public int read() throws IOException
read
在类中 InputStream
IOException
InputStream.read()
public long skip(long n) throws IOException
skip
在类中 InputStream
IOException
public int read(byte[] arg0, int arg1, int arg2) throws IOException
read
在类中 InputStream
IOException
InputStream.read(byte[], int, int)
public InputStream getWrappedInputStream()
Copyright © 2016. All rights reserved.