Package ej.hoka.http.body
Class StringBodyParser
- java.lang.Object
-
- ej.hoka.http.body.StringBodyParser
-
- All Implemented Interfaces:
BodyParser<String>
public class StringBodyParser extends Object implements BodyParser<String>
A body parser reading the full body and storing it in a string. The raw buffer of the body is appended into a String.
-
-
Constructor Summary
Constructors Constructor Description StringBodyParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringparseBody(InputStream inputStream, String contentType)Parse the body.
-
-
-
Method Detail
-
parseBody
public String parseBody(InputStream inputStream, @Nullable String contentType) throws IOException
Description copied from interface:BodyParserParse the body.- Specified by:
parseBodyin interfaceBodyParser<String>- Parameters:
inputStream- the bodyInputStream.contentType- the"content-type"header of the request.- Returns:
- the body.
- Throws:
IOException- when anIOExceptionoccurs during the parsing.
-
-