public class MultiPartFormInputStream extends Object
Handle a MultiPart Mime input stream, breaking it up on the boundary into files and strings.
Modifier and Type | Class and Description |
---|---|
class |
MultiPartFormInputStream.MultiPart |
Constructor and Description |
---|
MultiPartFormInputStream(InputStream in,
String contentType,
MultipartConfigElement config,
File contextTmpDir) |
Modifier and Type | Method and Description |
---|---|
void |
deleteParts()
Delete any tmp storage for parts, and clear out the parts list.
|
int |
getBufferSize() |
Collection<Part> |
getParsedParts()
Deprecated.
|
Part |
getPart(String name)
Get the named Part.
|
Collection<Part> |
getParts()
Parse, if necessary, the multipart data and return the list of Parts.
|
boolean |
isDeleteOnExit() |
boolean |
isEmpty() |
boolean |
isWriteFilesWithFilenames() |
void |
setBufferSize(int bufferSize) |
void |
setDeleteOnExit(boolean deleteOnExit) |
void |
setWriteFilesWithFilenames(boolean writeFilesWithFilenames) |
public MultiPartFormInputStream(InputStream in, String contentType, MultipartConfigElement config, File contextTmpDir)
in
- Request input streamcontentType
- Content-Type headerconfig
- MultipartConfigElementcontextTmpDir
- javax.servlet.context.tempdirpublic boolean isEmpty()
@Deprecated public Collection<Part> getParsedParts()
public void deleteParts()
public Collection<Part> getParts() throws IOException
IOException
- if unable to get the partspublic Part getPart(String name) throws IOException
name
- the part nameIOException
- if unable to get the partpublic 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 © 2010 - 2020 Adobe. All Rights Reserved