Package org.eclipse.jetty.util
Class MultiPartInputStreamParser
- java.lang.Object
-
- org.eclipse.jetty.util.MultiPartInputStreamParser
-
@Deprecated public class MultiPartInputStreamParser extends java.lang.Object
Deprecated.Replaced by org.eclipse.jetty.http.MultiPartFormInputStream The code for MultiPartInputStream is slower than its replacement MultiPartFormInputStream. However this class accepts formats non compliant the RFC that the new MultiPartFormInputStream does not accept.MultiPartInputStream Handle a MultiPart Mime input stream, breaking it up on the boundary into files and strings. Non Compliance warnings are documented by the methodgetNonComplianceWarnings()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MultiPartInputStreamParser.MultiPart
Deprecated.static class
MultiPartInputStreamParser.NonCompliance
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description static javax.servlet.MultipartConfigElement
__DEFAULT_MULTIPART_CONFIG
Deprecated.protected javax.servlet.MultipartConfigElement
_config
Deprecated.protected java.lang.String
_contentType
Deprecated.protected java.io.File
_contextTmpDir
Deprecated.protected java.lang.Exception
_err
Deprecated.protected java.io.InputStream
_in
Deprecated.protected boolean
_parsed
Deprecated.protected MultiMap<javax.servlet.http.Part>
_parts
Deprecated.protected java.io.File
_tmpDir
Deprecated.protected boolean
_writeFilesWithFilenames
Deprecated.static MultiMap<javax.servlet.http.Part>
EMPTY_MAP
Deprecated.
-
Constructor Summary
Constructors Constructor Description MultiPartInputStreamParser(java.io.InputStream in, java.lang.String contentType, javax.servlet.MultipartConfigElement config, java.io.File contextTmpDir)
Deprecated.MultiPartInputStreamParser(java.io.InputStream in, java.lang.String contentType, javax.servlet.MultipartConfigElement config, java.io.File contextTmpDir, int maxParts)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
deleteParts()
Deprecated.Delete any tmp storage for parts, and clear out the parts list.java.util.EnumSet<MultiPartInputStreamParser.NonCompliance>
getNonComplianceWarnings()
Deprecated.java.util.Collection<javax.servlet.http.Part>
getParsedParts()
Deprecated.Get the already parsed parts.javax.servlet.http.Part
getPart(java.lang.String name)
Deprecated.Get the named Part.java.util.Collection<javax.servlet.http.Part>
getParts()
Deprecated.Parse, if necessary, the multipart data and return the list of Parts.boolean
isDeleteOnExit()
Deprecated.no replacement offered.boolean
isWriteFilesWithFilenames()
Deprecated.protected void
parse()
Deprecated.Parse, if necessary, the multipart stream.void
setDeleteOnExit(boolean deleteOnExit)
Deprecated.no replacement offered.void
setWriteFilesWithFilenames(boolean writeFilesWithFilenames)
Deprecated.protected void
throwIfError()
Deprecated.Throws an exception if one has been latched.
-
-
-
Field Detail
-
__DEFAULT_MULTIPART_CONFIG
public static final javax.servlet.MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
Deprecated.
-
EMPTY_MAP
public static final MultiMap<javax.servlet.http.Part> EMPTY_MAP
Deprecated.
-
_in
protected java.io.InputStream _in
Deprecated.
-
_config
protected javax.servlet.MultipartConfigElement _config
Deprecated.
-
_contentType
protected java.lang.String _contentType
Deprecated.
-
_parts
protected MultiMap<javax.servlet.http.Part> _parts
Deprecated.
-
_err
protected java.lang.Exception _err
Deprecated.
-
_tmpDir
protected java.io.File _tmpDir
Deprecated.
-
_contextTmpDir
protected java.io.File _contextTmpDir
Deprecated.
-
_writeFilesWithFilenames
protected boolean _writeFilesWithFilenames
Deprecated.
-
_parsed
protected boolean _parsed
Deprecated.
-
-
Constructor Detail
-
MultiPartInputStreamParser
public MultiPartInputStreamParser(java.io.InputStream in, java.lang.String contentType, javax.servlet.MultipartConfigElement config, java.io.File contextTmpDir)
Deprecated.- Parameters:
in
- Request input streamcontentType
- Content-Type headerconfig
- MultipartConfigElementcontextTmpDir
- javax.servlet.context.tempdir
-
MultiPartInputStreamParser
public MultiPartInputStreamParser(java.io.InputStream in, java.lang.String contentType, javax.servlet.MultipartConfigElement config, java.io.File contextTmpDir, int maxParts)
Deprecated.- Parameters:
in
- Request input streamcontentType
- Content-Type headerconfig
- MultipartConfigElementcontextTmpDir
- javax.servlet.context.tempdirmaxParts
- the maximum number of parts that can be parsed from the multipart content (0 for no parts allowed, -1 for unlimited parts).
-
-
Method Detail
-
getNonComplianceWarnings
public java.util.EnumSet<MultiPartInputStreamParser.NonCompliance> getNonComplianceWarnings()
Deprecated.- Returns:
- an EnumSet of non compliances with the RFC that were accepted by this parser
-
getParsedParts
public java.util.Collection<javax.servlet.http.Part> getParsedParts()
Deprecated.Get the already parsed parts.- Returns:
- the parts that were parsed
-
deleteParts
public void deleteParts()
Deprecated.Delete any tmp storage for parts, and clear out the parts list.
-
getParts
public java.util.Collection<javax.servlet.http.Part> getParts() throws java.io.IOException
Deprecated.Parse, if necessary, the multipart data and return the list of Parts.- Returns:
- the parts
- Throws:
java.io.IOException
- if unable to get the parts
-
getPart
public javax.servlet.http.Part getPart(java.lang.String name) throws java.io.IOException
Deprecated.Get the named Part.- Parameters:
name
- the part name- Returns:
- the parts
- Throws:
java.io.IOException
- if unable to get the part
-
throwIfError
protected void throwIfError() throws java.io.IOException
Deprecated.Throws an exception if one has been latched.- Throws:
java.io.IOException
- the exception (if present)
-
parse
protected void parse()
Deprecated.Parse, if necessary, the multipart stream.
-
setDeleteOnExit
@Deprecated public void setDeleteOnExit(boolean deleteOnExit)
Deprecated.no replacement offered.
-
setWriteFilesWithFilenames
public void setWriteFilesWithFilenames(boolean writeFilesWithFilenames)
Deprecated.
-
isWriteFilesWithFilenames
public boolean isWriteFilesWithFilenames()
Deprecated.
-
isDeleteOnExit
@Deprecated public boolean isDeleteOnExit()
Deprecated.no replacement offered.
-
-