Interface Content

    • Method Detail

      • parseLine

        void parseLine​(String line)
        Add the line to the content.
        Parameters:
        line - The line to add.
      • isParseFailed

        boolean isParseFailed()
        Flag indicating there were errors parsing the content.
        Returns:
        true if there were parse errors.
      • getErrors

        List<String> getErrors()
        Get the list of error messages generating during parsing.
        Returns:
        A list of error messages generating during parsing.
      • stripLastNewline

        void stripLastNewline()
        Informs the Content that the last newline should be removed again. The newline before a boundary is part of the boundary, not of the content.
      • isFinished

        Content.IsFinished isFinished()
        Gives the parse-state of the Content. This indicates if more content is expected or not.
        Returns:
        the parse-state of the Content.
      • setLogIndent

        void setLogIndent​(String logIndent)
        Sets the indentation of log messages. Since Content can be nested, this makes debug output better readable.
        Parameters:
        logIndent - the indentation of log messages.
      • getContent

        String getContent​(boolean allHeaders)
        Get the String content.
        Parameters:
        allHeaders - flag indicating all headers should be included. If the content is going to be added to a HttpServletResponse, the headers need to be set separately.
        Returns:
        The content.
      • getHeaders

        Map<String,​String> getHeaders()
        Get the headers. This will include the Content-Type header.
        Returns:
        the headers.