Class MultipartFormBodyParser
java.lang.Object
de.craftsblock.craftsnet.api.http.body.BodyParser<MultipartFormBody>
de.craftsblock.craftsnet.api.http.body.parser.MultipartFormBodyParser
This class is a body parser specifically designed to parse multipart form data request bodies.
It extends the
BodyParser class and provides an implementation to parse multipart form data from an input stream.- Since:
- 3.0.4-SNAPSHOT
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new MultipartFormBodyParser object with the content type set to "multipart/form-data". -
Method Summary
Modifier and TypeMethodDescription@Nullable MultipartFormBodyparse(Request request, InputStream body) Parses the multipart form data body from the provided input stream.Methods inherited from class de.craftsblock.craftsnet.api.http.body.BodyParser
contentTypes, isParseable
-
Constructor Details
-
MultipartFormBodyParser
public MultipartFormBodyParser()Constructs a new MultipartFormBodyParser object with the content type set to "multipart/form-data".
-
-
Method Details
-
parse
Parses the multipart form data body from the provided input stream.- Specified by:
parsein classBodyParser<MultipartFormBody>- Parameters:
request- The HTTP request associated with the body.body- The input stream containing the multipart form data body.- Returns:
- The parsed multipart form data body object, or null if parsing fails.
-