Package psiprobe.tools
Class BackwardsFileStream
- java.lang.Object
-
- java.io.InputStream
-
- psiprobe.tools.BackwardsFileStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class BackwardsFileStream extends InputStream
The Class BackwardsFileStream.
-
-
Field Summary
Fields Modifier and Type Field Description private RandomAccessFile
raf
The raf.private long
seekPos
The seek pos.
-
Constructor Summary
Constructors Constructor Description BackwardsFileStream(File file)
Instantiates a new backwards file stream.BackwardsFileStream(File file, long pos)
Instantiates a new backwards file stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
read()
-
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
-
-
-
-
Field Detail
-
raf
private final RandomAccessFile raf
The raf.
-
seekPos
private long seekPos
The seek pos.
-
-
Constructor Detail
-
BackwardsFileStream
public BackwardsFileStream(File file) throws IOException
Instantiates a new backwards file stream.- Parameters:
file
- the file- Throws:
IOException
- Signals that an I/O exception has occurred.
-
BackwardsFileStream
public BackwardsFileStream(File file, long pos) throws IOException
Instantiates a new backwards file stream.- Parameters:
file
- the filepos
- the pos- Throws:
IOException
- Signals that an I/O exception has occurred.
-
-
Method Detail
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
-