Package org.omegat.util
Class MixedEolHandlingReader
java.lang.Object
java.io.Reader
org.omegat.util.MixedEolHandlingReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
This reader tries to detect the correct EOL type for the input stream based
on the frequency of EOL chars encountered within a lookahead range. Calling
readLine() will return lines that include "bad" EOL chars.
For example an input that is detected to be CRLF that contains a line
"foo\r\r\n" will return "foo\r" for that line. This differs from
BufferedReader in that the latter will treat all EOL chars as
starting new lines, so the above example would give "foo" and then "".
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, read, ready, reset, skip, transferTo
-
Constructor Details
-
MixedEolHandlingReader
- Throws:
IOException
-
-
Method Details
-
getDetectedEol
-
hasMixedEol
public boolean hasMixedEol() -
read
- Specified by:
readin classReader- Throws:
IOException
-
readLine
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-