Package org.ctan.markup.markdown.syntax
Class HighlightReader
java.lang.Object
java.io.Reader
java.io.FilterReader
java.io.PushbackReader
org.ctan.markup.markdown.syntax.HighlightReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
This class establishes a reader which treats ``` as EOF.
-
Field Summary
Fields inherited from class java.io.FilterReader
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.PushbackReader
mark, markSupported, ready, reset, skip, unread, unreadMethods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
HighlightReader
This is the constructor forHighlightReader.- Parameters:
reader- the reader
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classPushbackReader- Throws:
IOException- See Also:
-
expect
This method checks that the lookahead of several characters are identical to the expected character. Then these are digested. Otherwise the characters are pushed back into the input.- Parameters:
s- the expected characters- Returns:
trueiff n characters have been found- Throws:
IOException- in case of an I/O error
-
read
- Overrides:
readin classPushbackReader- Throws:
IOException- See Also:
-
read
- Overrides:
readin classPushbackReader- Throws:
IOException- See Also:
-
unread
- Overrides:
unreadin classPushbackReader- Throws:
IOException- See Also:
-