public class RepeatableFileInputStream extends InputStream
| Constructor and Description |
|---|
RepeatableFileInputStream(File file)
Creates a repeatable input stream based on a file.
|
| Modifier and Type | Method and Description |
|---|---|
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 in class InputStreamIOException - when the FileInputStream cannot be re-created.public boolean markSupported()
markSupported in class InputStreamInputStream.markSupported()public void mark(int readlimit)
mark in class InputStreamInputStream.mark(int)public int available()
throws IOException
available in class InputStreamIOExceptionInputStream.available()public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionInputStream.close()public int read()
throws IOException
read in class InputStreamIOExceptionInputStream.read()public long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int read(byte[] arg0,
int arg1,
int arg2)
throws IOException
read in class InputStreamIOExceptionInputStream.read(byte[], int, int)public InputStream getWrappedInputStream()
Copyright © 2016. All rights reserved.