Package play.mvc
Class BodyParser.BufferingBodyParser<A>
java.lang.Object
play.mvc.BodyParser.MaxLengthBodyParser<A>
play.mvc.BodyParser.BufferingBodyParser<A>
- All Implemented Interfaces:
BodyParser<A>
- Direct Known Subclasses:
BodyParser.Bytes,BodyParser.FormUrlEncoded,BodyParser.Text,BodyParser.TolerantJson,BodyParser.TolerantText,BodyParser.TolerantXml
- Enclosing interface:
- BodyParser<A>
public abstract static class BodyParser.BufferingBodyParser<A>
extends BodyParser.MaxLengthBodyParser<A>
A body parser that first buffers
-
Nested Class Summary
Nested classes/interfaces inherited from interface play.mvc.BodyParser
BodyParser.AnyContent, BodyParser.BufferingBodyParser<A>, BodyParser.Bytes, BodyParser.CompletableBodyParser<A>, BodyParser.Default, BodyParser.DelegatingBodyParser<A,B>, BodyParser.DelegatingMultipartFormDataBodyParser<A>, BodyParser.Empty, BodyParser.FormUrlEncoded, BodyParser.Json, BodyParser.MaxLengthBodyParser<A>, BodyParser.MultipartFormData, BodyParser.Of, BodyParser.Raw, BodyParser.TemporaryFile, BodyParser.Text, BodyParser.ToFile, BodyParser.TolerantJson, BodyParser.TolerantText, BodyParser.TolerantXml, BodyParser.Xml -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBufferingBodyParser(long maxLength, HttpErrorHandler errorHandler, String errorMessage) protectedBufferingBodyParser(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler, String errorMessage) -
Method Summary
Modifier and TypeMethodDescriptionprotected final Accumulator<ByteString,F.Either<Result, A>> apply1(Http.RequestHeader request) Implement this method to implement the actual body parser.protected abstract Aparse(Http.RequestHeader request, ByteString bytes) Parse the body.Methods inherited from class play.mvc.BodyParser.MaxLengthBodyParser
apply
-
Constructor Details
-
BufferingBodyParser
-
BufferingBodyParser
protected BufferingBodyParser(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler, String errorMessage)
-
-
Method Details
-
apply1
Description copied from class:BodyParser.MaxLengthBodyParserImplement this method to implement the actual body parser.- Specified by:
apply1in classBodyParser.MaxLengthBodyParser<A>- Parameters:
request- header for the request to parse- Returns:
- the accumulator that parses the request
-
parse
Parse the body.- Parameters:
request- The request associated with the body.bytes- The bytes of the body.- Returns:
- The body.
- Throws:
Exception- If the body failed to parse. It is assumed that any exceptions thrown by this method are the fault of the client, so a 400 bad request error will be returned if this method throws an exception.
-