Package ej.hoka.http.body
Interface BodyParser<T>
-
- Type Parameters:
T- the body type.
- All Known Implementing Classes:
MultiPartBodyParser,MultipartStringsParser,ParameterParser,StringBodyParser
public interface BodyParser<T>A parser called to read the body of anHttpRequest.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TparseBody(InputStream inputStream, String contentType)Parse the body.
-
-
-
Method Detail
-
parseBody
T parseBody(InputStream inputStream, @Nullable String contentType) throws IOException
Parse the body.- Parameters:
inputStream- the bodyInputStream.contentType- the"content-type"header of the request.- Returns:
- the body.
- Throws:
IOException- when anIOExceptionoccurs during the parsing.
-
-