public class MPEncodedFormData extends MPFormData
Constructor and Description |
---|
MPEncodedFormData(javax.servlet.http.HttpServletRequest req) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
extractNonfileDispositionInfo(java.lang.String line)
Extracts and returns disposition info from a line, as a String array with elements: disposition, name.
|
protected java.lang.String |
fixFileName(java.lang.String name)
Take the user supplied file name, replace any odd characters with underscore and
add .jpg to the end if not already there.
|
protected boolean |
readNextPart(psdi.webclient.system.controller.MPInputStreamHandler in,
java.lang.String boundary)
Reads the next part of the posted form.
|
protected void |
readRequest(javax.servlet.http.HttpServletRequest request)
Reads the encoded form data from the request.
|
getFileContentType, getFileName, getFileOutputStream, getFileOutputStreamForFile, getFileParams, getFileParamsForFile, getFullFileName, getParameter, isParam, isRequestMultipart, processRequest, readAndKeep
public MPEncodedFormData(javax.servlet.http.HttpServletRequest req) throws MXException
MXException
protected void readRequest(javax.servlet.http.HttpServletRequest request) throws java.io.IOException, MXException
readRequest
in class MPFormData
request
- The servlet request containing the encoded form data.java.io.IOException
- if the uploaded content is larger than
maxSize or there's a problem parsing the requestMXException
protected boolean readNextPart(psdi.webclient.system.controller.MPInputStreamHandler in, java.lang.String boundary) throws java.io.IOException
readNextPart
in class MPFormData
in
- The input stream containing the parts to be read in.boundary
- The boundary text used to separate each part.java.io.IOException
- if there's a problem reading or parsing the
requestprotected java.lang.String fixFileName(java.lang.String name)
name
- The file name to be cleaned and prepared for use.protected java.lang.String[] extractNonfileDispositionInfo(java.lang.String line) throws java.io.IOException
line
- The line of text containing the content to be parsed.java.io.IOException
- Thrown if the information is malformed.