Class MultiPartInputStreamParser

java.lang.Object
org.eclipse.jetty.server.MultiPartInputStreamParser

@Deprecated public class MultiPartInputStreamParser extends 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 method getNonComplianceWarnings()
  • Field Details

    • __DEFAULT_MULTIPART_CONFIG

      public static final jakarta.servlet.MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
      Deprecated.
    • EMPTY_MAP

      public static final MultiMap<jakarta.servlet.http.Part> EMPTY_MAP
      Deprecated.
    • _in

      protected InputStream _in
      Deprecated.
    • _config

      protected jakarta.servlet.MultipartConfigElement _config
      Deprecated.
    • _contentType

      protected String _contentType
      Deprecated.
    • _parts

      protected MultiMap<jakarta.servlet.http.Part> _parts
      Deprecated.
    • _err

      protected Exception _err
      Deprecated.
    • _tmpDir

      protected File _tmpDir
      Deprecated.
    • _contextTmpDir

      protected File _contextTmpDir
      Deprecated.
    • _writeFilesWithFilenames

      protected boolean _writeFilesWithFilenames
      Deprecated.
    • _parsed

      protected boolean _parsed
      Deprecated.
  • Constructor Details

    • MultiPartInputStreamParser

      public MultiPartInputStreamParser(InputStream in, String contentType, jakarta.servlet.MultipartConfigElement config, File contextTmpDir)
      Deprecated.
      Parameters:
      in - Request input stream
      contentType - Content-Type header
      config - MultipartConfigElement
      contextTmpDir - jakarta.servlet.context.tempdir
    • MultiPartInputStreamParser

      public MultiPartInputStreamParser(InputStream in, String contentType, jakarta.servlet.MultipartConfigElement config, File contextTmpDir, int maxParts)
      Deprecated.
      Parameters:
      in - Request input stream
      contentType - Content-Type header
      config - MultipartConfigElement
      contextTmpDir - javax.servlet.context.tempdir
      maxParts - the maximum number of parts that can be parsed from the multipart content (0 for no parts allowed, -1 for unlimited parts).
  • Method Details

    • getNonComplianceWarnings

      public EnumSet<MultiParts.NonCompliance> getNonComplianceWarnings()
      Deprecated.
      Returns:
      an EnumSet of non compliances with the RFC that were accepted by this parser
    • getParsedParts

      public Collection<jakarta.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 Collection<jakarta.servlet.http.Part> getParts() throws IOException
      Deprecated.
      Parse, if necessary, the multipart data and return the list of Parts.
      Returns:
      the parts
      Throws:
      IOException - if unable to get the parts
    • getPart

      public jakarta.servlet.http.Part getPart(String name) throws IOException
      Deprecated.
      Get the named Part.
      Parameters:
      name - the part name
      Returns:
      the parts
      Throws:
      IOException - if unable to get the part
    • throwIfError

      protected void throwIfError() throws IOException
      Deprecated.
      Throws an exception if one has been latched.
      Throws:
      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.