Package de.xima.fc.common.io
Class MarkableRandomAccessFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- de.xima.fc.common.io.MarkableRandomAccessFileInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class MarkableRandomAccessFileInputStream extends FilterInputStream
- Since:
- 8.3.0
- Author:
- XIMA Media GmbH
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidmark(int readLimit)booleanmarkSupported()static InputStreamnewMarkableInputStream(File file)Creates a new markable input stream from the givenFile.static InputStreamnewMarkableInputStream(RandomAccessFile file)Creates a new markable input stream from the givenRandomAccessFile.static InputStreamnewMarkableInputStream(Path file)Creates a new markable input stream from the givenPath.voidreset()-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
mark
public void mark(int readLimit)
- Overrides:
markin classFilterInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classFilterInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
newMarkableInputStream
public static InputStream newMarkableInputStream(RandomAccessFile file) throws IOException
Creates a new markable input stream from the givenRandomAccessFile.- Parameters:
file- TheRandomAccessFileto read from.- Returns:
- A new
InputStreaminstance that is markable and seekable. - Throws:
IOException- If an I/O error occurs.
-
newMarkableInputStream
public static InputStream newMarkableInputStream(File file) throws IOException
Creates a new markable input stream from the givenFile.- Parameters:
file- TheFileto read from.- Returns:
- A new
InputStreaminstance that is markable and seekable. - Throws:
IOException- If an I/O error occurs.
-
newMarkableInputStream
public static InputStream newMarkableInputStream(Path file) throws IOException
Creates a new markable input stream from the givenPath.- Parameters:
file- ThePathto read from.- Returns:
- A new
InputStreaminstance that is markable and seekable. - Throws:
IOException- If an I/O error occurs.
-
-