Class MixedContent

  • All Implemented Interfaces:
    Content

    public class MixedContent
    extends Object
    implements Content
    Parser for multipart/mixed mime type stringContent, since Tomcat only handles multipart/form-data.
    Author:
    scf
    • Constructor Detail

      • MixedContent

        public MixedContent​(CoreSettings settings,
                            boolean isChangeSet)
    • Method Detail

      • parseLine

        public void parseLine​(String line)
        Description copied from interface: Content
        Add the line to the content.
        Specified by:
        parseLine in interface Content
        Parameters:
        line - The line to add.
      • parseLineInternal

        public void parseLineInternal​(String line)
      • isParseFailed

        public boolean isParseFailed()
        Description copied from interface: Content
        Flag indicating there were errors parsing the content.
        Specified by:
        isParseFailed in interface Content
        Returns:
        true if there were parse errors.
      • getErrors

        public List<String> getErrors()
        Description copied from interface: Content
        Get the list of error messages generating during parsing.
        Specified by:
        getErrors in interface Content
        Returns:
        A list of error messages generating during parsing.
      • stripLastNewline

        public void stripLastNewline()
        Description copied from interface: Content
        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.
        Specified by:
        stripLastNewline in interface Content
      • isFinished

        public Content.IsFinished isFinished()
        Description copied from interface: Content
        Gives the parse-state of the Content. This indicates if more content is expected or not.
        Specified by:
        isFinished in interface Content
        Returns:
        the parse-state of the Content.
      • setLogIndent

        public void setLogIndent​(String logIndent)
        Description copied from interface: Content
        Sets the indentation of log messages. Since Content can be nested, this makes debug output better readable.
        Specified by:
        setLogIndent in interface Content
        Parameters:
        logIndent - the indentation of log messages.
      • getParts

        public List<Part> getParts()
      • getContent

        public String getContent​(boolean allHeaders)
        Description copied from interface: Content
        Get the String content.
        Specified by:
        getContent in interface 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

        public Map<String,​String> getHeaders()
        Description copied from interface: Content
        Get the headers. This will include the Content-Type header.
        Specified by:
        getHeaders in interface Content
        Returns:
        the headers.