public class MultiPartInputStreamParser extends Object
Modifier and Type | Class and Description |
---|---|
class |
MultiPartInputStreamParser.MultiPart |
Modifier and Type | Field and Description |
---|---|
static javax.servlet.MultipartConfigElement |
__DEFAULT_MULTIPART_CONFIG |
protected javax.servlet.MultipartConfigElement |
_config |
protected String |
_contentType |
protected File |
_contextTmpDir |
protected boolean |
_deleteOnExit |
protected InputStream |
_in |
protected MultiMap<javax.servlet.http.Part> |
_parts |
protected File |
_tmpDir |
Constructor and Description |
---|
MultiPartInputStreamParser(InputStream in,
String contentType,
javax.servlet.MultipartConfigElement config,
File contextTmpDir) |
Modifier and Type | Method and Description |
---|---|
void |
deleteParts()
Delete any tmp storage for parts, and clear out the parts list.
|
Collection<javax.servlet.http.Part> |
getParsedParts()
Get the already parsed parts.
|
javax.servlet.http.Part |
getPart(String name)
Get the named Part.
|
Collection<javax.servlet.http.Part> |
getParts()
Parse, if necessary, the multipart data and return the list of Parts.
|
boolean |
isDeleteOnExit() |
protected void |
parse()
Parse, if necessary, the multipart stream.
|
void |
setDeleteOnExit(boolean deleteOnExit) |
public static final javax.servlet.MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
protected InputStream _in
protected javax.servlet.MultipartConfigElement _config
protected String _contentType
protected MultiMap<javax.servlet.http.Part> _parts
protected File _tmpDir
protected File _contextTmpDir
protected boolean _deleteOnExit
public MultiPartInputStreamParser(InputStream in, String contentType, javax.servlet.MultipartConfigElement config, File contextTmpDir)
in
- Request input streamcontentType
- Content-Type headerconfig
- MultipartConfigElementcontextTmpDir
- javax.servlet.context.tempdirpublic Collection<javax.servlet.http.Part> getParsedParts()
public void deleteParts() throws MultiException
MultiException
- if unable to delete the partspublic Collection<javax.servlet.http.Part> getParts() throws IOException
IOException
- if unable to get the partspublic javax.servlet.http.Part getPart(String name) throws IOException
name
- the part nameIOException
- if unable to get the partprotected void parse() throws IOException
IOException
- if unable to parsepublic void setDeleteOnExit(boolean deleteOnExit)
public boolean isDeleteOnExit()
Copyright © 1995-2015 Webtide. All Rights Reserved.