public class MultiPartInputStreamParser
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
class |
MultiPartInputStreamParser.MultiPart |
| Modifier and Type | Field | Description |
|---|---|---|
static MultipartConfigElement |
__DEFAULT_MULTIPART_CONFIG |
|
protected 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<Part> |
_parts |
|
protected java.io.File |
_tmpDir |
|
protected boolean |
_writeFilesWithFilenames |
|
static MultiMap<Part> |
EMPTY_MAP |
| Constructor | Description |
|---|---|
MultiPartInputStreamParser(java.io.InputStream in,
java.lang.String contentType,
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<Part> |
getParsedParts() |
Get the already parsed parts.
|
Part |
getPart(java.lang.String name) |
Get the named Part.
|
java.util.Collection<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 MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
protected java.io.InputStream _in
protected MultipartConfigElement _config
protected java.lang.String _contentType
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,
MultipartConfigElement config,
java.io.File contextTmpDir)
in - Request input streamcontentType - Content-Type headerconfig - MultipartConfigElementcontextTmpDir - javax.servlet.context.tempdirpublic java.util.Collection<Part> getParsedParts()
public void deleteParts()
throws MultiException
MultiException - if unable to delete the partspublic java.util.Collection<Part> getParts() throws java.io.IOException
java.io.IOException - if unable to get the partspublic 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–2018 Webtide. All rights reserved.