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