UploadContext (Apache Tomcat 9.0.73 API Documentation)

Package org.apache.tomcat.util.http.fileupload

## Interface UploadContext

- All Superinterfaces:
    `RequestContext`
  All Known Implementing Classes:
    `ServletRequestContext`

      public interface UploadContext
      extends RequestContext

  Enhanced access to the request information needed for file uploads, which fixes the Content Length data access in `RequestContext`. The reason of introducing this new interface is just for backward compatibility and it might vanish for a refactored 2.x version moving the new method into RequestContext again.
  Since:
    1.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `contentLength()` | Retrieve the content length of the request.

    - ### Methods inherited from interface org.apache.tomcat.util.http.fileupload.RequestContext

      `getCharacterEncoding, getContentType, getInputStream`

- - ### Method Detail

    - #### contentLength

          long contentLength()

      Retrieve the content length of the request.
      Returns:
        The content length of the request.
      Since:
        1.3