public class MultiPartInputStream extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
MultiPartInputStream.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<String> |
_parts |
protected File |
_tmpDir |
| Constructor and Description |
|---|
MultiPartInputStream(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 File _tmpDir
protected File _contextTmpDir
protected boolean _deleteOnExit
public MultiPartInputStream(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
MultiExceptionpublic Collection<javax.servlet.http.Part> getParts() throws IOException, javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionpublic javax.servlet.http.Part getPart(String name) throws IOException, javax.servlet.ServletException
name - IOExceptionjavax.servlet.ServletExceptionprotected void parse()
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionpublic void setDeleteOnExit(boolean deleteOnExit)
public boolean isDeleteOnExit()
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.