|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.share.util.MultipartFormHandler
MultipartFormHandler - parses an incoming file upload post. This classs parses the incoming post and returns MultipartStreamItems for each form item.
If setCharacterEncoding() is called (with anything other than null),
then strings returned from this class will be character-set decoded.
Otherwise, strings returned from this class are not character-set
decoded. In this way, MultipartFormHandler precisely matches
the behavior of ServletRequest. Clients should use
CaboHttpUtils.decodeRequestParameter()
to decode
any returned parameters.
Constructor Summary | |
MultipartFormHandler(javax.servlet.ServletRequest request)
Create a MultipartFormHandler for the given servlet request. |
|
MultipartFormHandler(java.lang.String type,
java.io.InputStream in)
Create a MultipartFormHandler for the given InputStream and content type. |
Method Summary | |
long |
getBytesRead()
Returns the total number of bytes yet read. |
java.lang.String |
getCharacterEncoding()
Gets the character enocoding. |
long |
getMaximumAllowedBytes()
Gets the maximum number of bytes that MultipartFormItem.writeFile() will be allowed to write. |
MultipartFormItem |
getNextPart()
Returns the next MultipartStreamItem from the request, or null if no more are present. |
long |
getTotalBytes()
Returns the total size of the incoming content, or -1 if the length is not known. |
static boolean |
isMultipartRequest(javax.servlet.ServletRequest request)
Returns true if the servlet request is a multipart request. |
void |
setCharacterEncoding(java.lang.String characterEncoding)
Sets the character encoding. |
void |
setMaximumAllowedBytes(long maxAllowedBytes)
Sets the maximum number of bytes that MultipartFormItem.writeFile() will be allowed to write. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MultipartFormHandler(javax.servlet.ServletRequest request) throws java.io.IOException
public MultipartFormHandler(java.lang.String type, java.io.InputStream in) throws java.io.IOException
type
- The content type, including the boundary string.
The content type must be "multipart/form-data", and
must define the multipart boundary value.in
- The InputStream which provides the multipart/form-data contentMethod Detail |
public static boolean isMultipartRequest(javax.servlet.ServletRequest request)
public java.lang.String getCharacterEncoding()
public void setCharacterEncoding(java.lang.String characterEncoding) throws java.io.UnsupportedEncodingException
public long getBytesRead()
public long getTotalBytes()
public void setMaximumAllowedBytes(long maxAllowedBytes)
maxAllowedBytes
- the maximum number of bytes that
MultipartFormItem.writeFile() will be allowed to write. Defaults
to 128MB.MultipartFormItem.writeFile(java.io.OutputStream)
public long getMaximumAllowedBytes()
public MultipartFormItem getNextPart() throws java.io.IOException
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |