public class MultipartStreamParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected FileUploadFactory |
fileUploadFactory |
protected java.util.Map<java.lang.String,FileUpload[]> |
requestFiles |
protected java.util.Map<java.lang.String,java.lang.String[]> |
requestParameters |
Constructor and Description |
---|
MultipartStreamParser() |
MultipartStreamParser(FileUploadFactory fileUploadFactory) |
Modifier and Type | Method and Description |
---|---|
FileUpload |
getFile(java.lang.String paramName)
Returns uploaded file.
|
java.util.Set<java.lang.String> |
getFileParameterNames()
Returns parameter names of all uploaded files.
|
FileUpload[] |
getFiles(java.lang.String paramName)
Returns all uploaded files the given request parameter has.
|
java.lang.String |
getParameter(java.lang.String paramName)
Returns single value of a parameter.
|
java.util.Set<java.lang.String> |
getParameterNames()
Returns the names of the parameters contained in this request.
|
java.lang.String[] |
getParameterValues(java.lang.String paramName)
Returns all values all of the values the given request parameter has.
|
boolean |
isParsed()
Returns
true if multi-part request is already loaded. |
void |
parseRequestStream(java.io.InputStream inputStream,
java.lang.String encoding)
Extracts uploaded files and parameters from the request data.
|
protected void |
putFile(java.lang.String name,
FileUpload value) |
protected void |
putParameter(java.lang.String name,
java.lang.String value) |
protected void |
putParameters(java.lang.String name,
java.lang.String[] values) |
protected void |
setParsed()
Sets the loaded flag that indicates that input stream is loaded and parsed.
|
protected FileUploadFactory fileUploadFactory
protected java.util.Map<java.lang.String,java.lang.String[]> requestParameters
protected java.util.Map<java.lang.String,FileUpload[]> requestFiles
public MultipartStreamParser()
public MultipartStreamParser(FileUploadFactory fileUploadFactory)
protected void setParsed() throws java.io.IOException
java.io.IOException
public boolean isParsed()
true
if multi-part request is already loaded.protected void putFile(java.lang.String name, FileUpload value)
protected void putParameters(java.lang.String name, java.lang.String[] values)
protected void putParameter(java.lang.String name, java.lang.String value)
public void parseRequestStream(java.io.InputStream inputStream, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public java.lang.String getParameter(java.lang.String paramName)
null
if not foundpublic java.util.Set<java.lang.String> getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String paramName)
public FileUpload getFile(java.lang.String paramName)
paramName
- parameter name of the uploaded filenull
if parameter name not foundpublic FileUpload[] getFiles(java.lang.String paramName)
public java.util.Set<java.lang.String> getFileParameterNames()
Copyright © 2003-present Jodd Team