RequestContext (Apache Tomcat 8.5.57 API Documentation)

org.apache.tomcat.util.http.fileupload

## Interface RequestContext

- All Known Subinterfaces:
    UploadContext
  All Known Implementing Classes:
    ServletRequestContext

      public interface RequestContext

  Abstracts access to the request information needed for file uploads. This interface should be implemented for each type of request that may be handled by FileUpload, such as servlets and portlets.

  Since:
    FileUpload 1.1

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCharacterEncoding()` Retrieve the character encoding for the request.
    `String` | `getContentType()` Retrieve the content type of the request.
    `InputStream` | `getInputStream()` Retrieve the input stream for the request.

- - ### Method Detail

    - #### getCharacterEncoding

          String getCharacterEncoding()

      Retrieve the character encoding for the request.
      Returns:
        The character encoding for the request.

    - #### getContentType

          String getContentType()

      Retrieve the content type of the request.
      Returns:
        The content type of the request.

    - #### getInputStream

          InputStream getInputStream()
                                     throws IOException

      Retrieve the input stream for the request.
      Returns:
        The input stream for the request.
      Throws:
        `IOException` - if a problem occurs.

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.