com.conradroche.matra.parser
Class CommentReaderImpl

java.lang.Object
  |
  +--com.conradroche.matra.parser.CommentReaderImpl
All Implemented Interfaces:
CommentReader

public class CommentReaderImpl
extends java.lang.Object
implements CommentReader

Class to read the comment text.

Author:
Conrad Roche

Constructor Summary
CommentReaderImpl()
          CommentReaderImpl Constructor.
 
Method Summary
 boolean isCommentStart(DTDData data)
          Checks if there is a comment at the beginning of the data.
 Comment readComment(DTDData data)
          Read the comment from the data stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentReaderImpl

public CommentReaderImpl()
CommentReaderImpl Constructor.
Method Detail

readComment

public Comment readComment(DTDData data)
                    throws DTDSyntaxException
Read the comment from the data stream.
Specified by:
readComment in interface CommentReader
Parameters:
data - The stream from which to read the comment.
Returns:
The comment.
Throws:
DTDSyntaxException - If the comment contains a syntax error.

isCommentStart

public boolean isCommentStart(DTDData data)
Checks if there is a comment at the beginning of the data.
Specified by:
isCommentStart in interface CommentReader
Parameters:
data - The data to be parsed.
Returns:
true if the current location of the data has a comment; false otherwise.