Interface CommentHandler

All Known Implementing Classes:
CommentHandlers

@Immutable public interface CommentHandler
Extracts comments from a buffered reader or collection of lines.
Since:
4.0.0
  • Method Details

    • extractHeader

      @Nullable String extractHeader(BufferedReader reader) throws IOException
      Defines the handlers behaviour for reading comments.
      Parameters:
      reader - reader to get input from
      Returns:
      an extracted comment, if any
      Throws:
      IOException - if any IO error occurs in the process
      Since:
      4.0.0
    • toComment

      Converts the specified lines into a comment.
      Parameters:
      lines - lines to make a comment
      Returns:
      transformed lines as a stream
      Since:
      4.0.0