Class MarkableFileInputStream
java.lang.Object
java.io.InputStream
opennlp.tools.util.MarkableFileInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
Implements a markable
FileInputStream.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class InputStream
available, nullInputStream, readAllBytes, readNBytes, readNBytes, skip, skipNBytes, transferTo
-
Field Details
-
in
-
markedPosition
private long markedPosition -
markException
-
-
Constructor Details
-
MarkableFileInputStream
MarkableFileInputStream(File file) throws FileNotFoundException Initializes aMarkableFileInputStream.- Parameters:
file- TheFileused as input source.- Throws:
FileNotFoundException- Thrown iffilecould not be found.
-
-
Method Details
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
throwMarkExceptionIfOccurred
- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
close
Closes the file this stream opened. Closing an already closed stream has no effect.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- Thrown if the file cannot be closed.
-