Interface Content
-
- All Known Implementing Classes:
HttpContent,MixedContent,StringContent
public interface Content- Author:
- scf
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classContent.IsFinishedIndicates the parse-state of the Content.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetContent(boolean allHeaders)Get the String content.List<String>getErrors()Get the list of error messages generating during parsing.Map<String,String>getHeaders()Get the headers.Content.IsFinishedisFinished()Gives the parse-state of the Content.booleanisParseFailed()Flag indicating there were errors parsing the content.voidparseLine(String line)Add the line to the content.voidsetLogIndent(String logIndent)Sets the indentation of log messages.voidstripLastNewline()Informs the Content that the last newline should be removed again.
-
-
-
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.
-
-