@ -182,6 +182,9 @@ public class AmazonS3 {
/** Encryption algorithm, may be a null instance that provides pass-through. */
/** Encryption algorithm, may be a null instance that provides pass-through. */
private final WalkEncryption encryption ;
private final WalkEncryption encryption ;
/** Directory for locally buffered content. */
private final File tmpDir ;
/ * *
/ * *
* Create a new S3 client for the supplied user information .
* Create a new S3 client for the supplied user information .
* < p >
* < p >
@ -251,6 +254,9 @@ public class AmazonS3 {
maxAttempts = Integer . parseInt ( props . getProperty (
maxAttempts = Integer . parseInt ( props . getProperty (
"httpclient.retry-max" , "3" ) ) ; //$NON-NLS-1$ //$NON-NLS-2$
"httpclient.retry-max" , "3" ) ) ; //$NON-NLS-1$ //$NON-NLS-2$
proxySelector = ProxySelector . getDefault ( ) ;
proxySelector = ProxySelector . getDefault ( ) ;
String tmp = props . getProperty ( "tmpdir" ) ; //$NON-NLS-1$
tmpDir = tmp ! = null & & tmp . length ( ) > 0 ? new File ( tmp ) : null ;
}
}
/ * *
/ * *
@ -452,7 +458,7 @@ public class AmazonS3 {
final ProgressMonitor monitor , final String monitorTask )
final ProgressMonitor monitor , final String monitorTask )
throws IOException {
throws IOException {
final MessageDigest md5 = newMD5 ( ) ;
final MessageDigest md5 = newMD5 ( ) ;
final TemporaryBuffer buffer = new TemporaryBuffer . LocalFile ( ) {
final TemporaryBuffer buffer = new TemporaryBuffer . LocalFile ( tmpDir ) {
@Override
@Override
public void close ( ) throws IOException {
public void close ( ) throws IOException {
super . close ( ) ;
super . close ( ) ;