public class MultipartConfigElement
extends java.lang.Object
MultipartConfig
used to configure
multi-part handling for a Servlet when registering a Servlet via code.Constructor and Description |
---|
MultipartConfigElement(MultipartConfig annotation)
Create a programmatic configuration from an annotation.
|
MultipartConfigElement(java.lang.String location)
Create a programmatic multi-part configuration with a specific location
and defaults for the remaining configuration elements.
|
MultipartConfigElement(java.lang.String location,
long maxFileSize,
long maxRequestSize,
int fileSizeThreshold)
Create a programmatic multi-part configuration from the individual
configuration elements.
|
Modifier and Type | Method and Description |
---|---|
int |
getFileSizeThreshold()
Obtain the size above which the file is save in the temporary location
rather than retained in memory.
|
java.lang.String |
getLocation()
Obtain the location where temporary files should be stored.
|
long |
getMaxFileSize()
Obtain the maximum permitted size for a single file.
|
long |
getMaxRequestSize()
Obtain the maximum permitted size for a single request.
|
public MultipartConfigElement(java.lang.String location)
location
- The temporary location to store filespublic MultipartConfigElement(java.lang.String location, long maxFileSize, long maxRequestSize, int fileSizeThreshold)
location
- The temporary location to store filesmaxFileSize
- The maximum permitted size for a single filemaxRequestSize
- The maximum permitted size for a requestfileSizeThreshold
- The size above which the file is save in the
temporary location rather than retained in
memory.public MultipartConfigElement(MultipartConfig annotation)
annotation
- The source annotation to copy to create the
programmatic equivalent.public java.lang.String getLocation()
public long getMaxFileSize()
public long getMaxRequestSize()
public int getFileSizeThreshold()
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.