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 and Description |
---|---|
class |
MultiPartFormInputStream.MultiPart |
Constructor and Description |
---|
MultiPartFormInputStream(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.
|
int |
getBufferSize() |
java.util.Collection<javax.servlet.http.Part> |
getParsedParts()
Deprecated.
|
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 |
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, javax.servlet.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<javax.servlet.http.Part> getParsedParts()
public void deleteParts()
public 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()
public int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize
- the size of buffer used to read data from the input streamCopyright © 1995–2023 Webtide. All rights reserved.