public class MultiPartInputStreamParser extends Object
Modifier and Type | Class and Description |
---|---|
class |
MultiPartInputStreamParser.MultiPart |
Modifier and Type | Field and Description |
---|---|
static MultipartConfigElement |
__DEFAULT_MULTIPART_CONFIG |
protected MultipartConfigElement |
_config |
protected String |
_contentType |
protected File |
_contextTmpDir |
protected boolean |
_deleteOnExit |
protected InputStream |
_in |
protected MultiMap<Part> |
_parts |
protected File |
_tmpDir |
Constructor and Description |
---|
MultiPartInputStreamParser(InputStream in,
String contentType,
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<Part> |
getParsedParts()
Get the already parsed parts.
|
Part |
getPart(String name)
Get the named Part.
|
Collection<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 MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
protected InputStream _in
protected MultipartConfigElement _config
protected String _contentType
protected File _tmpDir
protected File _contextTmpDir
protected boolean _deleteOnExit
public MultiPartInputStreamParser(InputStream in, String contentType, MultipartConfigElement config, File contextTmpDir)
in
- Request input streamcontentType
- Content-Type headerconfig
- MultipartConfigElementcontextTmpDir
- javax.servlet.context.tempdirpublic Collection<Part> getParsedParts()
public void deleteParts() throws MultiException
MultiException
public Collection<Part> getParts() throws IOException, ServletException
IOException
ServletException
public Part getPart(String name) throws IOException, ServletException
name
- IOException
ServletException
protected void parse() throws IOException, ServletException
IOException
ServletException
public void setDeleteOnExit(boolean deleteOnExit)
public boolean isDeleteOnExit()
Copyright © 1995-2015 Webtide. All Rights Reserved.