Class Part
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.multipart.Part
-
public class Part extends Object
- Author:
- scf
-
-
Constructor Summary
Constructors Constructor Description Part(CoreSettings settings, boolean inChangeSet)Creates a new Part.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendLine(String line)Parse the given line and add it to the Part.ContentgetContent()Get the Content of this Part.StringgetHeader(String name)Get the value of the header with the given name.Content.IsFinishedisFinished()Gives the parse-state of the Content in this Part.PartsetContent(Content content)Set the Content of this Part.PartsetLogIndent(String logIndent)Sets the indentation of log messages.voidstripLastNewline()Informs the Content that the last newline should be removed again.
-
-
-
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.
-
-