Class AbstractRequestContext<T>
java.lang.Object
org.apache.commons.fileupload2.core.AbstractRequestContext<T>
- All Implemented Interfaces:
RequestContext
- Direct Known Subclasses:
JakartaServletRequestContext,JavaxServletRequestContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LongSupplierSupplies the content length default.Supplies the content length string.private final TThe request. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRequestContext(Function<String, String> contentLengthString, LongSupplier contentLengthDefault, T request) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionlongGets the content length of the request.toString()Returns a string representation of this object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.fileupload2.core.RequestContext
getCharacterEncoding, getCharset, getContentType, getInputStream
-
Field Details
-
contentLengthDefault
Supplies the content length default. -
contentLengthString
Supplies the content length string. -
request
The request.
-
-
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
public long getContentLength()Gets the content length of the request.- Specified by:
getContentLengthin interfaceRequestContext- Returns:
- The content length of the request.
-
getRequest
-
toString
Returns a string representation of this object.
-