Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r175 - trunk/src/ise/antelope/tasks/SplitTask.java

antelope
Discussion topic

Back to topic list

svn commit: r175 - trunk/src/ise/antelope/tasks/SplitTask.java

Author danson
Full name Dale Anson
Date 2010-11-03 18:38:54 PDT
Message Author: danson
Date: 2010-11-03 18:38:53-0700
New Revision: 175

Modified:
   trunk/src/ise/antelo​pe/tasks/SplitTask.j​ava

Log:
fix for bug #49, split task.

Modified: trunk/src/ise/antelo​pe/tasks/SplitTask.j​ava
Url: http://antelope.tigr​is.org/source/browse​/antelope/trunk/src/​ise/antelope/tasks/S​plitTask.java?view=d​iff&pathrev=175​&r1=174&r2=17​5
====================​====================​====================​==================
--- trunk/src/ise/antelo​pe/tasks/SplitTask.j​ava (original)
+++ trunk/src/ise/antelo​pe/tasks/SplitTask.j​ava 2010-11-03 18:38:53-0700
@@ -320,17 +320,15 @@
         if ( size <= BUFFER_SIZE ) {
             buffer_size = size;
         }
- byte[] buffer = new byte[ java.lang.Math.min( BUFFER_SIZE, size ) ];
+ byte[] buffer = new byte[ buffer_size ];
         int bytes_read;
         int total = 0;
- int offset = 0;
         while ( true ) {
- bytes_read = from.read( buffer, 0, java.lang.Math.min( buffer_size, size - offset ) );
+ bytes_read = from.read( buffer, 0, buffer_size );
             if ( bytes_read == -1 )
                 break;
             to.write( buffer, 0, bytes_read );
             total += bytes_read;
- offset += bytes_read;
         }
         to.flush();
         return total;

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r175 - trunk/src/ise/antelope/tasks/SplitTask.java danson Dale Anson 2010-11-03 18:38:54 PDT
Messages per page: