public class DefaultPartBodyStreamStorageFactory extends Object implements PartBodyStreamStorageFactory
Default implementation of the PartBodyStreamStorageFactory.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_THRESHOLD
Default max threshold.
|
| Constructor and Description |
|---|
DefaultPartBodyStreamStorageFactory()
Constructor that uses a default threshold of 10kb and a default folder ${java.io.tmpdir}/nio-file-upload
|
DefaultPartBodyStreamStorageFactory(int maxSizeThreshold)
Constructor tha uses a default default folder ${java.io.tmpdir}/nio-file-upload
|
DefaultPartBodyStreamStorageFactory(String tempFolderPath)
Constructor tha uses a default threshold of 10kb.
|
DefaultPartBodyStreamStorageFactory(String tempFolderPath,
int maxSizeThreshold)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected File |
getTempFile(int partIndex) |
protected int |
getThreshold(Map<String,List<String>> partHeaders) |
org.synchronoss.cloud.nio.stream.storage.StreamStorage |
newStreamStorageForPartBody(Map<String,List<String>> partHeaders,
int partIndex)
Creates the
StreamStorage for a specific part. |
public static final int DEFAULT_MAX_THRESHOLD
public DefaultPartBodyStreamStorageFactory(String tempFolderPath, int maxSizeThreshold)
Constructor.
tempFolderPath - The path where to store the temporary filesmaxSizeThreshold - The maximum amount of bytes that will be kept in memory for each part. If zero or negative no memory will be used.public DefaultPartBodyStreamStorageFactory(String tempFolderPath)
Constructor tha uses a default threshold of 10kb.
tempFolderPath - The path where to store the temporary filespublic DefaultPartBodyStreamStorageFactory(int maxSizeThreshold)
Constructor tha uses a default default folder ${java.io.tmpdir}/nio-file-upload
maxSizeThreshold - The maximum amount of bytes that will be kept in memory for each part.public DefaultPartBodyStreamStorageFactory()
Constructor that uses a default threshold of 10kb and a default folder ${java.io.tmpdir}/nio-file-upload
public org.synchronoss.cloud.nio.stream.storage.StreamStorage newStreamStorageForPartBody(Map<String,List<String>> partHeaders, int partIndex)
Creates the StreamStorage for a specific part.
newStreamStorageForPartBody in interface PartBodyStreamStorageFactorypartHeaders - The headers of the partStreamStorage for a specific part.protected File getTempFile(int partIndex)
Copyright © 2017. All rights reserved.