public class RepeatableFileInputStream extends 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()
Returns the underlying input stream, if any, from the subclass; or null
if there is no underlying input stream.
|
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) |
abort, abortIfNeeded, isMetricActivatedpublic 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.InputStreamjava.io.IOException - when the FileInputStream cannot be re-created.public boolean markSupported()
markSupported in class java.io.InputStreampublic void mark(int readlimit)
mark in class java.io.InputStreampublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] arg0,
int arg1,
int arg2)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic java.io.InputStream getWrappedInputStream()
SdkInputStreamgetWrappedInputStream in class SdkInputStream