Package org.alfresco.repo.web.scripts
Class TempOutputStreamFactory
java.lang.Object
org.alfresco.repo.web.scripts.TempOutputStreamFactory
Factory for
TempOutputStream
-
Constructor Summary
ConstructorsConstructorDescriptionTempOutputStreamFactory
(File tempDir, int memoryThreshold, long maxContentSize, boolean encrypt, boolean deleteTempFileOnClose) Creates aTempOutputStream
factory. -
Method Summary
-
Constructor Details
-
TempOutputStreamFactory
public TempOutputStreamFactory(File tempDir, int memoryThreshold, long maxContentSize, boolean encrypt, boolean deleteTempFileOnClose) Creates aTempOutputStream
factory.- Parameters:
tempDir
- the temporary directory, i.e.isDir == true
, that will be used as * parent directory for creating temp file backed streamsmemoryThreshold
- the memory threshold in BmaxContentSize
- the max content size in Bencrypt
- true if temp files should be encrypteddeleteTempFileOnClose
- true if temp files should be deleted on output stream close (useful if we need to cache the content for further reads). If this is false then we need to make sure we callTempOutputStream
.destroy to clean up properly.
-
-
Method Details
-
createOutputStream
Creates a newTempOutputStream
object -
getTempDir
-
getMemoryThreshold
public int getMemoryThreshold() -
getMaxContentSize
public long getMaxContentSize() -
isEncrypt
public boolean isEncrypt() -
isDeleteTempFileOnClose
public boolean isDeleteTempFileOnClose()
-