>URL: http://svn.apache.org/viewvc?view=rev&rev=554675
>Log:
>IMPROVEMENT: File buffer increased to 64KB (IVY-551)
>
>incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh
/Scp.java (original)
>@@ -285,7 +285,7 @@
> 
>     private void sendFile(Channel channel, String localFile, String
remoteName, String mode)
>             throws IOException, RemoteScpException {
>-        byte[] buffer = new byte[8192];
>+        byte[] buffer = new byte[64 * 1024];
> 
>@@ -367,7 +367,7 @@
>      */
>     private FileInfo receiveStream(Channel channel, String file,
OutputStream targetStream)
>             throws IOException, RemoteScpException {
>-        byte[] buffer = new byte[8192];
>+        byte[] buffer = new byte[64 * 1024];


Why not use a constant like in SshRepository (BUFFER_SIZE)?
I am not sure if it makes sence to factor constants out into a "constant
class" 
(like Ant's MagicNumbers) or into FileUtil.


>incubator/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandl
er.java (original)
>@@ -36,7 +36,7 @@
>  */
> public class BasicURLHandler extends AbstractURLHandler {
> 
>-    private static final int BUFFER_SIZE = 4096;
>+    private static final int BUFFER_SIZE = 64 * 1024;


same - no constant used.



Jan

Reply via email to