Package org.alfresco.repo.web.scripts
Class TempOutputStreamFactory
- java.lang.Object
-
- org.alfresco.repo.web.scripts.TempOutputStreamFactory
-
public class TempOutputStreamFactory extends java.lang.Object
Factory forTempOutputStream
-
-
Constructor Summary
Constructors Constructor Description TempOutputStreamFactory(java.io.File tempDir, int memoryThreshold, long maxContentSize, boolean encrypt, boolean deleteTempFileOnClose)
Creates aTempOutputStream
factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TempOutputStream
createOutputStream()
Creates a newTempOutputStream
objectlong
getMaxContentSize()
int
getMemoryThreshold()
java.io.File
getTempDir()
boolean
isDeleteTempFileOnClose()
boolean
isEncrypt()
-
-
-
Constructor Detail
-
TempOutputStreamFactory
public TempOutputStreamFactory(java.io.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 Detail
-
createOutputStream
public TempOutputStream createOutputStream()
Creates a newTempOutputStream
object
-
getTempDir
public java.io.File getTempDir()
-
getMemoryThreshold
public int getMemoryThreshold()
-
getMaxContentSize
public long getMaxContentSize()
-
isEncrypt
public boolean isEncrypt()
-
isDeleteTempFileOnClose
public boolean isDeleteTempFileOnClose()
-
-