Changeset 42efed5 for router


Ignore:
Timestamp:
Dec 3, 2016 4:00:09 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
176ecaa
Parents:
f461d48
Message:

Clean up single char indexOf()

Location:
router/java/src/net/i2p/router
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java

    rf461d48 r42efed5  
    211211            out = new BufferedOutputStream(new SecureFileOutputStream(tmp));
    212212            out.write(magic);
    213             byte buf[] = new byte[16*1024];
    214             int read = 0;
    215             while ( (read = in.read(buf)) != -1)
    216                 out.write(buf, 0, read);
     213            DataHelper.copy(in, out);
    217214            out.close();
    218215            int[] stats;
  • router/java/src/net/i2p/router/startup/WorkingDir.java

    rf461d48 r42efed5  
    431431            in = new FileInputStream(src);
    432432            out = new SecureFileOutputStream(dst);
    433            
    434             int read = 0;
    435             while ( (read = in.read(buf)) != -1)
    436                 out.write(buf, 0, read);
    437            
     433            DataHelper.copy(in, out);
    438434            System.err.println("Copied " + src.getPath());
    439435        } catch (IOException ioe) {
Note: See TracChangeset for help on using the changeset viewer.