Changeset 176ecaa for core


Ignore:
Timestamp:
Dec 3, 2016 4:18:56 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1d6fc40
Parents:
42efed5
Message:

use new copy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/crypto/TrustedUpdate.java

    r42efed5 r176ecaa  
    643643
    644644            DataHelper.skip(fileInputStream, HEADER_BYTES);
    645 
    646             byte[] buffer = new byte[16*1024];
    647             int bytesRead = 0;
    648 
    649             while ( (bytesRead = fileInputStream.read(buffer)) != -1)
    650                 fileOutputStream.write(buffer, 0, bytesRead);
     645            DataHelper.copy(fileInputStream, fileOutputStream);
    651646        } catch (IOException ioe) {
    652647            // probably permissions or disk full, so bring the message out to the console
     
    785780            fileOutputStream.write(versionHeader);
    786781            fileInputStream = new FileInputStream(inputFile);
    787             byte[] buffer = new byte[1024];
    788             int bytesRead = 0;
    789             while ( (bytesRead = fileInputStream.read(buffer)) != -1)
    790                 fileOutputStream.write(buffer, 0, bytesRead);
     782            DataHelper.copy(fileInputStream, fileOutputStream);
    791783            fileOutputStream.close();
    792784        } catch (IOException ioe) {
Note: See TracChangeset for help on using the changeset viewer.