public class RepeatableFileInputStream
extends com.amazonaws.internal.SdkInputStream
Constructor and Description |
---|
RepeatableFileInputStream(java.io.File file)
Creates a repeatable input stream based on a file.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
java.io.File |
getFile()
Returns the File this stream is reading data from.
|
java.io.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) |
public RepeatableFileInputStream(java.io.File file) throws java.io.FileNotFoundException
file
- The file from which this input stream reads data.java.io.FileNotFoundException
- If the specified file doesn't exist, or
can't be opened.public java.io.File getFile()
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
- when the FileInputStream cannot be re-created.public boolean markSupported()
markSupported
in class java.io.InputStream
public void mark(int readlimit)
mark
in class java.io.InputStream
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public int read(byte[] arg0, int arg1, int arg2) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public java.io.InputStream getWrappedInputStream()
getWrappedInputStream
in class com.amazonaws.internal.SdkInputStream