Package org.exoplatform.portal.resource
Class SkipCommentReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
org.exoplatform.portal.resource.SkipCommentReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
A subclass of BufferedReader which skip the comment block
- Author:
- Minh Hoang TO
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSkipCommentReader(Reader reader) SkipCommentReader(Reader reader, CommentBlockHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionUsed for JUnit testsvoidpushback(CharSequence sequence) readLine()intRecursive method that read a single character from underlying reader.voidsetCommentBlockHandler(CommentBlockHandler commentBlockHandler) voidsetNumberOfCommingEscapes(int numberOfCommingEscapes) Methods inherited from class java.io.BufferedReader
close, lines, mark, markSupported, read, read, ready, reset, skipMethods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
SkipCommentReader
-
SkipCommentReader
-
-
Method Details
-
readSingleCharacter
Recursive method that read a single character from underlying reader. Encountered comment block is escaped automatically.- Returns:
- Throws:
IOException
-
readLine
- Overrides:
readLinein classBufferedReader- Throws:
IOException
-
getCursorState
Used for JUnit tests- Returns:
-
setCommentBlockHandler
-
setNumberOfCommingEscapes
public void setNumberOfCommingEscapes(int numberOfCommingEscapes) -
pushback
-