Class CommentStream

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.BufferedReader cs
      The reader from which to read comments.
      protected boolean fastScan
      A flag indicating whether comments should be read in "fast scan" mode or not.
    • Constructor Summary

      Constructors 
      Constructor Description
      CommentStream()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close this CommentStream.
      void init​(java.io.BufferedReader br)
      Initialize a CommentStream.
      abstract java.lang.String readComment()
      Read the next comment from the input reader.
      void setFastScan​(boolean b)
      Set this comment stream into "fast scan" mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cs

        protected java.io.BufferedReader cs
        The reader from which to read comments.
      • fastScan

        protected boolean fastScan
        A flag indicating whether comments should be read in "fast scan" mode or not.
    • Constructor Detail

      • CommentStream

        public CommentStream()
    • Method Detail

      • init

        public void init​(java.io.BufferedReader br)
        Initialize a CommentStream.
        Parameters:
        br - The reader from which to read.
      • close

        public void close()
                   throws java.io.IOException
        Close this CommentStream.
        Throws:
        java.io.IOException - if there is a problem closing the stream.
      • setFastScan

        public void setFastScan​(boolean b)
        Set this comment stream into "fast scan" mode. Depending on the context, this should be set if there is a constraint that limits the set of comments that might be of interest.
        Parameters:
        b - Set to true to enable a fast scan for comments.
      • readComment

        public abstract java.lang.String readComment()
                                              throws java.io.IOException
        Read the next comment from the input reader.
        Returns:
        The next comment that is read from the stream.
        Throws:
        java.io.IOException - if there is a problem while reading the next comment.