Package org.omegat.util
Class LinebreakPreservingReader
java.lang.Object
java.io.Reader
org.omegat.util.LinebreakPreservingReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
Reader class that preserves line breaks when using readLine(), that can be
retrieved through getLastLinebreak()
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.Reader
nullReader, read, transferTo
-
Constructor Details
-
LinebreakPreservingReader
Creates a new reader.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
getLinebreak
Returns the linebreak after the last line read by readLine(). If any other read methods are called after readLine(), the linebreak returned by this method may be incorrect. -
mark
- Overrides:
markin classReader- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classReader
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Specified by:
readin classReader- Throws:
IOException
-
readLine
- Throws:
IOException
-
ready
- Overrides:
readyin classReader- Throws:
IOException
-
reset
- Overrides:
resetin classReader- Throws:
IOException
-
skip
- Overrides:
skipin classReader- Throws:
IOException
-
printLinebreak
-