public class MultiPartFormInputStream
extends java.lang.Object
Handle a MultiPart Mime input stream, breaking it up on the boundary into files and strings.
Modifier and Type | Class | Description |
---|---|---|
class |
MultiPartFormInputStream.MultiPart |
Constructor | Description |
---|---|
MultiPartFormInputStream(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.
|
int |
getBufferSize() |
|
java.util.Collection<Part> |
getParsedParts() |
Deprecated.
|
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 |
isEmpty() |
|
boolean |
isWriteFilesWithFilenames() |
|
protected void |
parse() |
Parse, if necessary, the multipart stream.
|
void |
setBufferSize(int bufferSize) |
|
void |
setDeleteOnExit(boolean deleteOnExit) |
|
void |
setWriteFilesWithFilenames(boolean writeFilesWithFilenames) |
|
protected void |
throwIfError() |
Throws an exception if one has been latched.
|
public MultiPartFormInputStream(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 boolean isEmpty()
@Deprecated public java.util.Collection<Part> getParsedParts()
public void deleteParts()
public 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()
public int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize
- the size of buffer used to read data from the input streamCopyright © 1995–2018 Webtide. All rights reserved.