public class MultiPartInputStream
extends java.lang.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 java.lang.String |
_contentType |
protected java.io.File |
_contextTmpDir |
protected boolean |
_deleteOnExit |
protected java.io.InputStream |
_in |
protected MultiMap<java.lang.String> |
_parts |
protected java.io.File |
_tmpDir |
| Constructor and Description |
|---|
MultiPartInputStream(java.io.InputStream in,
java.lang.String contentType,
javax.servlet.MultipartConfigElement config,
java.io.File contextTmpDir) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteParts()
Delete any tmp storage for parts, and clear out the parts list.
|
java.util.Collection<javax.servlet.http.Part> |
getParsedParts()
Get the already parsed parts.
|
javax.servlet.http.Part |
getPart(java.lang.String name)
Get the named Part.
|
java.util.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 java.io.InputStream _in
protected javax.servlet.MultipartConfigElement _config
protected java.lang.String _contentType
protected MultiMap<java.lang.String> _parts
protected java.io.File _tmpDir
protected java.io.File _contextTmpDir
protected boolean _deleteOnExit
public MultiPartInputStream(java.io.InputStream in,
java.lang.String contentType,
javax.servlet.MultipartConfigElement config,
java.io.File contextTmpDir)
in - Request input streamcontentType - Content-Type headerconfig - MultipartConfigElementcontextTmpDir - javax.servlet.context.tempdirpublic java.util.Collection<javax.servlet.http.Part> getParsedParts()
public void deleteParts()
throws MultiException
MultiExceptionpublic java.util.Collection<javax.servlet.http.Part> getParts()
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionpublic javax.servlet.http.Part getPart(java.lang.String name)
throws java.io.IOException,
javax.servlet.ServletException
name - java.io.IOExceptionjavax.servlet.ServletExceptionprotected void parse()
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionpublic void setDeleteOnExit(boolean deleteOnExit)
public boolean isDeleteOnExit()
Copyright © 2013 FuseSource, Corp.. All Rights Reserved.