Package org.orekit.data
Class LineOrientedFilteringReader
java.lang.Object
java.io.Reader
org.orekit.data.LineOrientedFilteringReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
Base class for implementing line-oriented data filtering readers.
This reader is intended to be used in DataFilter.
- Since:
- 12.1
- Author:
- Luc Maisonobe
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLineOrientedFilteringReader(String name, Reader input) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract CharSequencefilterLine(int lineNumber, String originalLine) Filter one line.protected BufferedReaderGet the underlying line-oriented reader.intread(char[] b, int offset, int len) Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, read, ready, reset, skip, transferTo
-
Constructor Details
-
LineOrientedFilteringReader
Simple constructor.- Parameters:
name- file nameinput- underlying raw stream- Throws:
IOException- if first lines cannot be read
-
-
Method Details
-
getBufferedReader
Get the underlying line-oriented reader.- Returns:
- underlying line-oriented reader
-
read
- Specified by:
readin classReader- Throws:
IOException
-
filterLine
Filter one line.- Parameters:
lineNumber- line numberoriginalLine- original line- Returns:
- filtered line
- Throws:
IOException- if line cannot be parsed
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-