Interface RequestContext
- All Known Implementing Classes:
AbstractRequestContext
,JakartaServletRequestContext
,JakartaServletRequestContext
,JavaxPortletRequestContext
,JavaxServletRequestContext
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.
-
Method Summary
Modifier and TypeMethodDescriptionGets the character encoding for the request.default Charset
Gets the character encoding for the request or null if unspecified.long
Gets the content length of the request.Gets the content type of the request.Gets the input stream for the request.
-
Method Details
-
getCharacterEncoding
Gets the character encoding for the request.- Returns:
- The character encoding for the request.
-
getCharset
Gets the character encoding for the request or null if unspecified.- Returns:
- The character encoding for the request or null.
- Throws:
UnsupportedCharsetException
- If the named Charset is unavailable.
-
getContentLength
long getContentLength()Gets the content length of the request.- Returns:
- The content length of the request.
-
getContentType
Gets the content type of the request.- Returns:
- The content type of the request.
-
getInputStream
Gets the input stream for the request.- Returns:
- The input stream for the request.
- Throws:
IOException
- if a problem occurs.
-