Changeset 2520
- Timestamp:
- Jun 25, 2014, 8:45:56 AM (9 years ago)
- Location:
- extensions/net.sf.basedb.xfiles/trunk/src/net/sf/basedb/xfiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.xfiles/trunk/src/net/sf/basedb/xfiles/XFiles.java
r2518 r2520 39 39 */ 40 40 public static final int DEFAULT_SSH_PORT = 22; 41 41 42 /** 43 Default size of internal buffer when downloading files is 1MB. 44 */ 45 public static final int DEFAULT_BUFFER_SIZE = 1024*1024; 42 46 } -
extensions/net.sf.basedb.xfiles/trunk/src/net/sf/basedb/xfiles/sftp/SftpConnectionManager.java
r2519 r2520 22 22 package net.sf.basedb.xfiles.sftp; 23 23 24 import java.io.BufferedInputStream; 24 25 import java.io.IOException; 25 26 import java.io.InputStream; … … 87 88 sftp = ssh.newSFTPClient(); 88 89 remote = sftp.open(uri.getPath(), EnumSet.of(OpenMode.READ)); 89 stream = new CloseResourceInputStream(remote.new RemoteFileInputStream(), new MultiCloseable(remote, sftp, ssh)); 90 stream = new CloseResourceInputStream( 91 new BufferedInputStream(remote.new RemoteFileInputStream(), XFiles.DEFAULT_BUFFER_SIZE), 92 new MultiCloseable(remote, sftp, ssh)); 90 93 } 91 94 finally
Note: See TracChangeset
for help on using the changeset viewer.