All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.io.CommentParser
java.lang.Object
|
+----sdsu.io.CommentParser
- public class CommentParser
- extends Object
Parses two types of comments: normal and data. A normal comment
starts with a comment character on a new line. (Actually a comment in indicated
when the first non-whitespace character on a new line is the comment char.)
A data comment is a comment with the special comment character
occuring immediatley after the comment character in a comment and the
text in the comment is formated in name-value pairs. These pairs can be
used to create a LabeledData object.
- Version:
- 1.0 12 June 1998
- Author:
- Roger Whitney
(whitney@cs.sdsu.edu)
-
CommentParser(PushbackReader, char, char)
-
-
CommentParser(PushbackReader, char, char, String)
-
-
readAll()
- Returns rest of the input in a string
-
readComment()
- Returns comment from the input
If input does not start with a comment return a string
of length zero
-
readDataComment()
- Returns special comment from the input
If input does not start with a special comment return a string
of length zero
-
removeWhiteSpace()
- Insures that the input stream starts with non-whitespace char
CommentParser
public CommentParser(PushbackReader input,
char commentChar,
char specialCommentChar)
CommentParser
public CommentParser(PushbackReader input,
char commentChar,
char specialCommentChar,
String whiteSpace)
removeWhiteSpace
public void removeWhiteSpace() throws IOException
- Insures that the input stream starts with non-whitespace char
readAll
public String readAll() throws IOException
- Returns rest of the input in a string
readComment
public String readComment() throws IOException
- Returns comment from the input
If input does not start with a comment return a string
of length zero
readDataComment
public LabeledData readDataComment() throws IOException
- Returns special comment from the input
If input does not start with a special comment return a string
of length zero
All Packages Class Hierarchy This Package Previous Next Index