Class MultiPartFormData.Parser
java.lang.Object
org.eclipse.jetty.http.MultiPartFormData.Parser
- Enclosing class:
 MultiPartFormData
- 
Constructor Summary
ConstructorsConstructorDescriptionParser(String boundary, MultiPartCompliance multiPartCompliance, ComplianceViolation.Listener complianceViolationListener) Deprecated. - 
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(MultiPartConfig config) Configure the Parser given aMultiPartConfiginstance.Returns the default charset as specified by RFC 7578, section 4.6, that is the charset specified by the part named_charset_.longlonglonglongintbooleanparse(Content.Source content) Deprecated, for removal: This API element is subject to removal in a future version.voidparse(Content.Source content, Promise.Invocable<MultiPartFormData.Parts> promise) voidparse(Content.Source content, Promise<MultiPartFormData.Parts> immediate, Promise.Invocable<MultiPartFormData.Parts> future) Deprecated, for removal: This API element is subject to removal in a future version.parse(Content.Source content, Invocable.InvocationType invocationType) Deprecated, for removal: This API element is subject to removal in a future version.voidsetFilesDirectory(Path filesDirectory) Sets the directory where the files uploaded in the parts will be saved.voidsetMaxFileSize(long maxFileSize) voidsetMaxLength(long maxLength) voidsetMaxMemoryFileSize(long maxMemoryFileSize) Sets the maximum memory file size in bytes, after which files will be saved in the directory specified bysetFilesDirectory(Path).voidsetMaxParts(long maxParts) voidsetPartHeadersMaxLength(int partHeadersMaxLength) voidsetUseFilesForPartsWithoutFileName(boolean useFilesForPartsWithoutFileName)  
- 
Constructor Details
- 
Parser
 - 
Parser
@Deprecated public Parser(String boundary, MultiPartCompliance multiPartCompliance, ComplianceViolation.Listener complianceViolationListener) Deprecated.useParser(String)withconfigure(MultiPartConfig). 
 - 
 - 
Method Details
- 
parse
@Deprecated(forRemoval=true, since="12.0.16") public void parse(Content.Source content, Promise<MultiPartFormData.Parts> immediate, Promise.Invocable<MultiPartFormData.Parts> future) Deprecated, for removal: This API element is subject to removal in a future version. - 
parse
@Deprecated(forRemoval=true, since="12.0.15") public CompletableFuture<MultiPartFormData.Parts> parse(Content.Source content) Deprecated, for removal: This API element is subject to removal in a future version. - 
parse
@Deprecated(forRemoval=true, since="12.0.15") public CompletableFuture<MultiPartFormData.Parts> parse(Content.Source content, Invocable.InvocationType invocationType) Deprecated, for removal: This API element is subject to removal in a future version. - 
parse
 - 
getBoundary
- Returns:
 - the boundary string
 
 - 
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.Partheaders, in bytes, or -1 for unlimited length 
 - 
setPartHeadersMaxLength
public void setPartHeadersMaxLength(int partHeadersMaxLength) - Parameters:
 partHeadersMaxLength- the max length of aMultiPart.Partheaders, 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
- Returns:
 - the directory where files are saved
 
 - 
setFilesDirectory
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
0to always save the files in the directory.Use value
-1to 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.
 - 
configure
Configure the Parser given aMultiPartConfiginstance.- Parameters:
 config- the configuration.
 
 - 
 
Parser(String)withconfigure(MultiPartConfig).