Package rife.servlet
Class MultipartRequest
java.lang.Object
rife.servlet.MultipartRequest
Parses a
multipart/form-data request body into parameters and
uploaded files, with the upload limits and the upload path of the
engine configuration.- Since:
- 1.11.0
-
Constructor Summary
ConstructorsConstructorDescriptionMultipartRequest(String contentType, InputStream input) Parses a multipart body. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the uploaded files of the request.Retrieves the parameters of the request.static booleanisValidContentType(String type) Checks whether a content type is the one of a multipart form.
-
Constructor Details
-
MultipartRequest
Parses a multipart body.- Parameters:
contentType- the content type of the request, with its boundaryinput- the body of the request- Throws:
MultipartRequestException- when the body can't be parsed or exceeds the upload limits- Since:
- 1.11.0
-
-
Method Details
-
isValidContentType
Checks whether a content type is the one of a multipart form.- Parameters:
type- the content type- Returns:
trueif it'smultipart/form-data; orfalseotherwise- Since:
- 1.11.0
-
getParameterMap
Retrieves the parameters of the request.- Returns:
- the parameters by name
- Since:
- 1.11.0
-
getFileMap
Retrieves the uploaded files of the request.- Returns:
- the uploaded files by name
- Since:
- 1.11.0
-