Package ej.hoka.http.body
Class StringBodyParser
- java.lang.Object
-
- ej.hoka.http.body.StringBodyParser
-
- All Implemented Interfaces:
BodyParser<java.lang.String>
public class StringBodyParser extends java.lang.Object implements BodyParser<java.lang.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 java.lang.StringparseBody(java.io.InputStream inputStream, java.lang.String contentType)Parse the body.
-
-
-
Method Detail
-
parseBody
public java.lang.String parseBody(java.io.InputStream inputStream, @Nullable java.lang.String contentType) throws java.io.IOExceptionDescription copied from interface:BodyParserParse the body.- Specified by:
parseBodyin interfaceBodyParser<java.lang.String>- Parameters:
inputStream- the bodyInputStream.contentType- the"content-type"header of the request.- Returns:
- the body.
- Throws:
java.io.IOException- when anIOExceptionoccurs during the parsing.
-
-