|
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.beanio.stream.util.CommentReader
public class CommentReader
Skips commented lines read from an input stream. The input stream must support marking (i.e.
Reader.markSupported() must return true). A line is considered commented if it starts
with one of the configured comment indicators.
| Constructor Summary | |
|---|---|
CommentReader(Reader in,
String[] comments)
Constructs a new CommentReader. |
|
CommentReader(Reader in,
String[] comments,
Character recordTerminator)
Constructs a new CommentReader. |
|
| Method Summary | |
|---|---|
boolean |
isEOF()
Returns whether the end of the stream was reached reading a commented line. |
boolean |
isSkipLF()
Returns whether the next character should be ignored if its a line feed. |
int |
skipComments(boolean initialSkipLF)
Skips comments in the input stream and returns the number of commented lines read. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommentReader(Reader in,
String[] comments)
throws IllegalArgumentException
in - the input stream to readcomments - an array of comment identifying strings
IllegalArgumentException - if the configured comments are invalid or the reader does
not support marking
public CommentReader(Reader in,
String[] comments,
Character recordTerminator)
throws IllegalArgumentException
in - the input stream to read fromcomments - an array of comment identifying stringsrecordTerminator - the record terminating character
IllegalArgumentException - if the configured comments are invalid or the reader does
not support marking| Method Detail |
|---|
public boolean isSkipLF()
public boolean isEOF()
public int skipComments(boolean initialSkipLF)
throws IOException
initialSkipLF - true if the first line feed character read should be ignored
IOException
|
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||