Package org.broadleafcommerce.common.io
Class ConcurrentFileOutputStreamImpl
java.lang.Object
org.broadleafcommerce.common.io.ConcurrentFileOutputStreamImpl
- All Implemented Interfaces:
ConcurrentFileOutputStream
@Component("blConcurrentFileOutputStream")
public class ConcurrentFileOutputStreamImpl
extends Object
implements ConcurrentFileOutputStream
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FilecreateTempFile(File dest) protected ObjectgetFileMoveLock(File file) protected Stringprotected voidreplaceExisting(File src, File dest) intwrite(InputStream src, File dest) intwrite(InputStream src, File dest, int bufferSize) protected intwriteToTempFile(InputStream src, File tempFile, int bufferSize)
-
Field Details
-
defaultFileBufferSize
@Value("${asset.server.file.buffer.size:8192}") protected int defaultFileBufferSize
-
-
Constructor Details
-
ConcurrentFileOutputStreamImpl
public ConcurrentFileOutputStreamImpl()
-
-
Method Details
-
write
- Specified by:
writein interfaceConcurrentFileOutputStream- Throws:
IOException
-
write
- Specified by:
writein interfaceConcurrentFileOutputStream- Throws:
IOException
-
createTempFile
- Throws:
IOException
-
getTempFileSuffix
-
writeToTempFile
- Throws:
IOException
-
replaceExisting
- Throws:
IOException
-
getFileMoveLock
-