Package org.lockss.laaws.rs.multipart
Class DigestFileItemFactory
java.lang.Object
org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory
org.lockss.laaws.rs.multipart.DigestFileItemFactory
- All Implemented Interfaces:
org.apache.tomcat.util.http.fileupload.FileItemFactory
public class DigestFileItemFactory
extends org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory
-
Field Summary
Fields inherited from class org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory
DEFAULT_SIZE_THRESHOLD -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an unconfigured instance of this class.DigestFileItemFactory(int sizeThreshold, File repository) Constructs a preconfigured instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.tomcat.util.http.fileupload.FileItemcreateItem(String fieldName, String contentType, boolean isFormField, String fileName) Methods inherited from class org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory
getDefaultCharset, getRepository, getSizeThreshold, setDefaultCharset, setRepository, setSizeThreshold
-
Constructor Details
-
DigestFileItemFactory
public DigestFileItemFactory()Constructs an unconfigured instance of this class. The resulting factory may be configured by calling the appropriate setter methods. -
DigestFileItemFactory
Constructs a preconfigured instance of this class.- Parameters:
sizeThreshold- The threshold, in bytes, below which items will be retained in memory and above which they will be stored as a file.repository- The data repository, which is the directory in which files will be created, should the item size exceed the threshold.
-
-
Method Details
-
createItem
public org.apache.tomcat.util.http.fileupload.FileItem createItem(String fieldName, String contentType, boolean isFormField, String fileName) - Specified by:
createItemin interfaceorg.apache.tomcat.util.http.fileupload.FileItemFactory- Overrides:
createItemin classorg.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory
-