Class AbstractRequestContext<T>
java.lang.Object
org.apache.commons.fileupload2.core.AbstractRequestContext<T>
- Type Parameters:
T
- The request type.
- All Implemented Interfaces:
RequestContext
Abstracts a RequestContext for implementations.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractRequestContext
(Function<String, String> contentLengthString, LongSupplier contentLengthDefault, T request) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the content length of the request.Gets the request.boolean
Tests whether the Request of typemultipart/related
?toString()
Returns a string representation of this object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.fileupload2.core.RequestContext
getCharacterEncoding, getCharset, getContentType, getInputStream
-
Constructor Details
-
AbstractRequestContext
protected AbstractRequestContext(Function<String, String> contentLengthString, LongSupplier contentLengthDefault, T request) Constructs a new instance.- Parameters:
contentLengthString
- How to get the content length string.contentLengthDefault
- How to get the content length default.request
- The request.
-
-
Method Details
-
getContentLength
Gets the content length of the request.- Specified by:
getContentLength
in interfaceRequestContext
- Returns:
- The content length of the request.
-
getRequest
Gets the request.- Returns:
- the request.
-
isMultipartRelated
Tests whether the Request of typemultipart/related
?- Specified by:
isMultipartRelated
in interfaceRequestContext
- Returns:
- whether the Request is of type
multipart/related
- Since:
- 2.0.0
-
toString
Returns a string representation of this object.
-