Class TempFileResourcesHandler
java.lang.Object
eu.europa.esig.dss.signature.resources.AbstractResourcesHandler
eu.europa.esig.dss.signature.resources.TempFileResourcesHandler
- All Implemented Interfaces:
DSSResourcesHandler,Closeable,AutoCloseable
This resources factory stores temporary documents to a unique file within filesystem.
Removes temporary files on exit, unless they have been used within a
eu.europa.esig.dss.model.FileDocument.-
Constructor Summary
ConstructorsConstructorDescriptionTempFileResourcesHandler(String fileNamePrefix, String fileNameSuffix, File tempFileDirectory) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected OutputStreamBuildsOutputStreamvoidclose()voidThis method is used to delete the temporary File forcibly, even with a flagtoBeDeletedset to false.This method creates a newDSSDocumentrepresenting a signed document, based on the createdOutputStream.Methods inherited from class eu.europa.esig.dss.signature.resources.AbstractResourcesHandler
createOutputStream, getOutputStream
-
Constructor Details
-
Method Details
-
buildOutputStream
Description copied from class:AbstractResourcesHandlerBuildsOutputStream- Specified by:
buildOutputStreamin classAbstractResourcesHandler- Returns:
OutputStream- Throws:
IOException- if an error occurs while building OutputStream
-
writeToDSSDocument
Description copied from interface:DSSResourcesHandlerThis method creates a newDSSDocumentrepresenting a signed document, based on the createdOutputStream.- Returns:
DSSDocument
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractResourcesHandler- Throws:
IOException
-
forceDelete
public void forceDelete()This method is used to delete the temporary File forcibly, even with a flagtoBeDeletedset to false. Method should be called responsively and the temp file should be preserved when needed (e.g. output of signDocument() method).
-