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
ConstructorsConstructorDescriptionHighlightReader
(PushbackReader reader) This is the constructor forHighlightReader
. -
Method Summary
Methods inherited from class java.io.PushbackReader
mark, markSupported, ready, reset, skip, unread, unread
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in 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:
true
iff n characters have been found- Throws:
IOException
- in case of an I/O error
-
read
- Overrides:
read
in classPushbackReader
- Throws:
IOException
- See Also:
-
read
- Overrides:
read
in classPushbackReader
- Throws:
IOException
- See Also:
-
unread
- Overrides:
unread
in classPushbackReader
- Throws:
IOException
- See Also:
-