Class MultiPartConfig.Builder

java.lang.Object
org.eclipse.jetty.http.MultiPartConfig.Builder
Enclosing class:
MultiPartConfig

public static class MultiPartConfig.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • location

      public MultiPartConfig.Builder location(Path location)
      Parameters:
      location - the directory where parts will be saved as files.
    • maxParts

      public MultiPartConfig.Builder maxParts(int maxParts)
      Parameters:
      maxParts - the maximum number of parts that can be parsed from the multipart content, or -1 for unlimited.
    • maxSize

      public MultiPartConfig.Builder maxSize(long maxSize)
      Returns:
      the maximum size in bytes of the whole multipart content, or -1 for unlimited.
    • maxPartSize

      public MultiPartConfig.Builder maxPartSize(long maxPartSize)
      Returns:
      the maximum part size in bytes, or -1 for unlimited.
    • maxMemoryPartSize

      public MultiPartConfig.Builder maxMemoryPartSize(long maxMemoryPartSize)

      Sets the maximum size of a part in memory, after which it will be written as a file.

      Use value 0 to always write the part to disk.

      Use value -1 to never write the part to disk.

      Parameters:
      maxMemoryPartSize - the maximum part size which can be held in memory.
    • maxHeadersSize

      public MultiPartConfig.Builder maxHeadersSize(int maxHeadersSize)
      Parameters:
      maxHeadersSize - the max length of a MultiPart.Part headers, in bytes, or -1 for unlimited length.
    • useFilesForPartsWithoutFileName

      public MultiPartConfig.Builder useFilesForPartsWithoutFileName(Boolean useFilesForPartsWithoutFileName)
      Parameters:
      useFilesForPartsWithoutFileName - whether parts without a fileName may be stored as files.
    • complianceMode

      public MultiPartConfig.Builder complianceMode(MultiPartCompliance complianceMode)
      Parameters:
      complianceMode - the compliance mode.
    • violationListener

      public MultiPartConfig.Builder violationListener(ComplianceViolation.Listener violationListener)
      Parameters:
      violationListener - the compliance violation listener.
    • build

      public MultiPartConfig build()