Class AbstractRequestContext<T>

java.lang.Object
org.apache.commons.fileupload2.core.AbstractRequestContext<T>
Type Parameters:
T - The request type.
All Implemented Interfaces:
RequestContext

public abstract class AbstractRequestContext<T> extends Object implements RequestContext
Abstracts a RequestContext for implementations.
  • 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:
      getContentLength in interface RequestContext
      Returns:
      The content length of the request.
    • getRequest

      public T getRequest()
      Gets the request.
      Returns:
      the request.
    • isMultipartRelated

      public boolean isMultipartRelated()
      Tests whether the Request of type multipart/related?
      Specified by:
      isMultipartRelated in interface RequestContext
      Returns:
      whether the Request is of type multipart/related
      Since:
      2.0.0
    • toString

      public String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this object.