Class MultiPartFormData.Parser

java.lang.Object
org.eclipse.jetty.http.MultiPartFormData.Parser
Enclosing class:
MultiPartFormData

public static class MultiPartFormData.Parser extends Object
  • Constructor Details

  • Method Details

    • parse

    • getBoundary

      public String getBoundary()
      Returns:
      the boundary string
    • getDefaultCharset

      public Charset getDefaultCharset()

      Returns the default charset as specified by RFC 7578, section 4.6, that is the charset specified by the part named _charset_.

      If that part is not present, returns null.

      Returns:
      the default charset specified by the _charset_ part, or null if that part is not present
    • getPartHeadersMaxLength

      public int getPartHeadersMaxLength()
      Returns:
      the max length of a MultiPart.Part headers, in bytes, or -1 for unlimited length
    • setPartHeadersMaxLength

      public void setPartHeadersMaxLength(int partHeadersMaxLength)
      Parameters:
      partHeadersMaxLength - the max length of a MultiPart.Part headers, in bytes, or -1 for unlimited length
    • isUseFilesForPartsWithoutFileName

      public boolean isUseFilesForPartsWithoutFileName()
      Returns:
      whether parts without fileName may be stored as files
    • setUseFilesForPartsWithoutFileName

      public void setUseFilesForPartsWithoutFileName(boolean useFilesForPartsWithoutFileName)
      Parameters:
      useFilesForPartsWithoutFileName - whether parts without fileName may be stored as files
    • getFilesDirectory

      public Path getFilesDirectory()
      Returns:
      the directory where files are saved
    • setFilesDirectory

      public void setFilesDirectory(Path filesDirectory)

      Sets the directory where the files uploaded in the parts will be saved.

      Parameters:
      filesDirectory - the directory where files are saved
    • getMaxFileSize

      public long getMaxFileSize()
      Returns:
      the maximum file size in bytes, or -1 for unlimited file size
    • setMaxFileSize

      public void setMaxFileSize(long maxFileSize)
      Parameters:
      maxFileSize - the maximum file size in bytes, or -1 for unlimited file size
    • getMaxMemoryFileSize

      public long getMaxMemoryFileSize()
      Returns:
      the maximum memory file size in bytes, or -1 for unlimited memory file size
    • setMaxMemoryFileSize

      public void setMaxMemoryFileSize(long maxMemoryFileSize)

      Sets the maximum memory file size in bytes, after which files will be saved in the directory specified by setFilesDirectory(Path).

      Use value 0 to always save the files in the directory.

      Use value -1 to never save the files in the directory.

      Parameters:
      maxMemoryFileSize - the maximum memory file size in bytes, or -1 for unlimited memory file size
    • getMaxLength

      public long getMaxLength()
      Returns:
      the maximum length in bytes of the whole multipart content, or -1 for unlimited length
    • setMaxLength

      public void setMaxLength(long maxLength)
      Parameters:
      maxLength - the maximum length in bytes of the whole multipart content, or -1 for unlimited length
    • getMaxParts

      public long getMaxParts()
      Returns:
      the maximum number of parts that can be parsed from the multipart content.
    • setMaxParts

      public void setMaxParts(long maxParts)
      Parameters:
      maxParts - the maximum number of parts that can be parsed from the multipart content.