public class MultiPartInputStreamParser
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
class |
MultiPartInputStreamParser.MultiPart |
| Modifier and Type | Field | 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.lang.Exception |
_err |
|
protected java.io.InputStream |
_in |
|
protected MultiMap<javax.servlet.http.Part> |
_parts |
|
protected java.io.File |
_tmpDir |
|
protected boolean |
_writeFilesWithFilenames |
|
static MultiMap<javax.servlet.http.Part> |
EMPTY_MAP |
| Constructor | Description |
|---|---|
MultiPartInputStreamParser(java.io.InputStream in,
java.lang.String contentType,
javax.servlet.MultipartConfigElement config,
java.io.File contextTmpDir) |
| Modifier and Type | Method | 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() |
|
boolean |
isWriteFilesWithFilenames() |
|
protected void |
parse() |
Parse, if necessary, the multipart stream.
|
void |
setDeleteOnExit(boolean deleteOnExit) |
|
void |
setWriteFilesWithFilenames(boolean writeFilesWithFilenames) |
|
protected void |
throwIfError() |
Throws an exception if one has been latched.
|
public static final javax.servlet.MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
public static final MultiMap<javax.servlet.http.Part> EMPTY_MAP
protected java.io.InputStream _in
protected javax.servlet.MultipartConfigElement _config
protected java.lang.String _contentType
protected MultiMap<javax.servlet.http.Part> _parts
protected java.lang.Exception _err
protected java.io.File _tmpDir
protected java.io.File _contextTmpDir
protected boolean _deleteOnExit
protected boolean _writeFilesWithFilenames
public MultiPartInputStreamParser(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
MultiException - if unable to delete the partspublic java.util.Collection<javax.servlet.http.Part> getParts()
throws java.io.IOException
java.io.IOException - if unable to get the partspublic javax.servlet.http.Part getPart(java.lang.String name)
throws java.io.IOException
name - the part namejava.io.IOException - if unable to get the partprotected void throwIfError()
throws java.io.IOException
java.io.IOException - the exception (if present)protected void parse()
public void setDeleteOnExit(boolean deleteOnExit)
public void setWriteFilesWithFilenames(boolean writeFilesWithFilenames)
public boolean isWriteFilesWithFilenames()
public boolean isDeleteOnExit()
Copyright © 1995–2017 Webtide. All rights reserved.