Interface RequestContext
-
- All Known Implementing Classes:
AbstractRequestContext
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getCharacterEncoding()
Gets the character encoding for the request.default Charset
getCharset()
Gets the character encoding for the request or null if unspecified.long
getContentLength()
Gets the content length of the request.String
getContentType()
Gets the content type of the request.InputStream
getInputStream()
Gets the input stream for the request.
-
-
-
Method Detail
-
getCharacterEncoding
String getCharacterEncoding()
Gets the character encoding for the request.- Returns:
- The character encoding for the request.
-
getCharset
default Charset getCharset() throws UnsupportedCharsetException
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
String getContentType()
Gets the content type of the request.- Returns:
- The content type of the request.
-
getInputStream
InputStream getInputStream() throws IOException
Gets the input stream for the request.- Returns:
- The input stream for the request.
- Throws:
IOException
- if a problem occurs.
-
-