Package org.lockss.laaws.rs.multipart
Class DigestFileItem
java.lang.Object
org.apache.tomcat.util.http.fileupload.disk.DiskFileItem
org.lockss.laaws.rs.multipart.DigestFileItem
- All Implemented Interfaces:
org.apache.tomcat.util.http.fileupload.FileItem,org.apache.tomcat.util.http.fileupload.FileItemHeadersSupport
public class DigestFileItem
extends org.apache.tomcat.util.http.fileupload.disk.DiskFileItem
-
Field Summary
Fields inherited from class org.apache.tomcat.util.http.fileupload.disk.DiskFileItem
DEFAULT_CHARSET -
Constructor Summary
ConstructorsConstructorDescriptionDigestFileItem(String fieldName, String contentType, boolean isFormField, String fileName, int sizeThreshold, File repository) -
Method Summary
Methods inherited from class org.apache.tomcat.util.http.fileupload.disk.DiskFileItem
delete, get, getCharSet, getDefaultCharset, getFieldName, getHeaders, getInputStream, getName, getSize, getStoreLocation, getString, getString, isFormField, isInMemory, setDefaultCharset, setFieldName, setFormField, setHeaders, toString, write
-
Constructor Details
-
DigestFileItem
-
-
Method Details
-
getOutputStream
- Specified by:
getOutputStreamin interfaceorg.apache.tomcat.util.http.fileupload.FileItem- Overrides:
getOutputStreamin classorg.apache.tomcat.util.http.fileupload.disk.DiskFileItem
-
getContentType
Returns theX-Lockss-Content-Typeheader if present, otherwise the normalContent-Typeheader. This is a workaround for the transport of invalid Content-Types.- Specified by:
getContentTypein interfaceorg.apache.tomcat.util.http.fileupload.FileItem- Overrides:
getContentTypein classorg.apache.tomcat.util.http.fileupload.disk.DiskFileItem
-
getDigest
-
getTempFile
Creates and returns aFilerepresenting a uniquely named temporary file in the configured repository path. The lifetime of the file is tied to the lifetime of theFileIteminstance; the file will be deleted when the instance is garbage collected.Note: Subclasses that override this method must ensure that they return the same File each time.
- Overrides:
getTempFilein classorg.apache.tomcat.util.http.fileupload.disk.DiskFileItem- Returns:
- The
Fileto be used for temporary storage.
-