Package org.restlet.ext.fileupload
Class RepresentationContext
- java.lang.Object
-
- org.restlet.ext.fileupload.RepresentationContext
-
- All Implemented Interfaces:
org.apache.commons.fileupload.RequestContext
public class RepresentationContext extends java.lang.Object implements org.apache.commons.fileupload.RequestContextProvides access to the representation information needed by the FileUpload processor.
-
-
Field Summary
Fields Modifier and Type Field Description private RepresentationmultipartFormThe representation to adapt.
-
Constructor Summary
Constructors Constructor Description RepresentationContext(Representation multipartForm)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCharacterEncoding()Returns the character encoding for the form.intgetContentLength()Returns the content length of the form.java.lang.StringgetContentType()Returns the content type of the form.java.io.InputStreamgetInputStream()Returns the input stream.
-
-
-
Field Detail
-
multipartForm
private volatile Representation multipartForm
The representation to adapt.
-
-
Constructor Detail
-
RepresentationContext
public RepresentationContext(Representation multipartForm)
Constructor.- Parameters:
multipartForm- The multipart form to parse.
-
-
Method Detail
-
getCharacterEncoding
public java.lang.String getCharacterEncoding()
Returns the character encoding for the form.- Specified by:
getCharacterEncodingin interfaceorg.apache.commons.fileupload.RequestContext- Returns:
- The character encoding for the form.
-
getContentLength
public int getContentLength()
Returns the content length of the form.- Specified by:
getContentLengthin interfaceorg.apache.commons.fileupload.RequestContext- Returns:
- The content length of the form.
-
getContentType
public java.lang.String getContentType()
Returns the content type of the form.- Specified by:
getContentTypein interfaceorg.apache.commons.fileupload.RequestContext- Returns:
- The content type of the form.
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionReturns the input stream.- Specified by:
getInputStreamin interfaceorg.apache.commons.fileupload.RequestContext- Returns:
- The input stream.
- Throws:
java.io.IOException
-
-