Author: nextgens
Date: 2008-05-31 15:14:56 +0000 (Sat, 31 May 2008)
New Revision: 20163
Modified:
trunk/apps/new_installer/src/Sha1Test.java
Log:
new_installer: doh
Modified: trunk/apps/new_installer/src/Sha1Test.java
===================================================================
--- trunk/apps/new_installer/src/Sha1Test.java 2008-05-31 14:55:27 UTC (rev
20162)
+++ trunk/apps/new_installer/src/Sha1Test.java 2008-05-31 15:14:56 UTC (rev
20163)
@@ -176,11 +176,10 @@
dis = new DataInputStream(new BufferedInputStream(is));
File f = new File(filename + (checksum ? ".sha1" : ""));
os = new BufferedOutputStream(new FileOutputStream(f));
- int length = 0, offset = 0;
+ int length = 0;
byte[] buffer = new byte[BUFFERSIZE];
- while((length = dis.read(buffer)) != -1) {
- os.write(buffer,offset, length);
- offset += length;
+ while((length = dis.read(buffer)) > -1) {
+ os.write(buffer, 0, length);
}
os.flush();
} catch(MalformedURLException mue) {