Class Part


  • public class Part
    extends Object
    Author:
    scf
    • Constructor Detail

      • Part

        public Part​(CoreSettings settings,
                    boolean inChangeSet)
        Creates a new Part.
        Parameters:
        settings - The settings.
        inChangeSet - flag indicating the Part is part of a ChangeSet, and thus if the part itself can be a ChangeSet.
    • Method Detail

      • isFinished

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

        public String getHeader​(String name)
        Get the value of the header with the given name.
        Parameters:
        name - The name of the header to get.
        Returns:
        The value of the header with the given name.
      • appendLine

        public void appendLine​(String line)
        Parse the given line and add it to the Part.
        Parameters:
        line - the line to parse.
      • stripLastNewline

        public 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.
      • getContent

        public Content getContent()
        Get the Content of this Part.
        Returns:
        the Content of this Part.
      • setContent

        public Part setContent​(Content content)
        Set the Content of this Part.
        Parameters:
        content - the Content of this Part.
        Returns:
        this.
      • setLogIndent

        public Part 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.
        Returns:
        this.