forked from I2P_Developers/i2p.i2p
cleanups
This commit is contained in:
@@ -357,6 +357,9 @@ public class FileUtil {
|
||||
* Dump the contents of the given path (relative to the root) to the output
|
||||
* stream. The path must not go above the root, either - if it does, it will
|
||||
* throw a FileNotFoundException
|
||||
*
|
||||
* Closes the OutputStream out on successful completion
|
||||
* but leaves it open when throwing IOE.
|
||||
*/
|
||||
public static void readFile(String path, String root, OutputStream out) throws IOException {
|
||||
File rootDir = new File(root);
|
||||
@@ -376,10 +379,10 @@ public class FileUtil {
|
||||
int read = 0;
|
||||
while ( (read = in.read(buf)) != -1)
|
||||
out.write(buf, 0, read);
|
||||
out.close();
|
||||
try { out.close(); } catch (IOException ioe) {}
|
||||
} finally {
|
||||
if (in != null)
|
||||
in.close();
|
||||
try { in.close(); } catch (IOException ioe) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ public class TunnelHistory {
|
||||
_lastFailed = _context.clock().now();
|
||||
}
|
||||
|
||||
/***** all unused
|
||||
public void setLifetimeAgreedTo(long num) { _lifetimeAgreedTo = num; }
|
||||
public void setLifetimeRejected(long num) { _lifetimeRejected = num; }
|
||||
public void setLifetimeFailed(long num) { _lifetimeFailed = num; }
|
||||
@@ -120,6 +121,7 @@ public class TunnelHistory {
|
||||
public void setLastRejectedTransient(long when) { _lastRejectedTransient = when; }
|
||||
public void setLastRejectedProbabalistic(long when) { _lastRejectedProbabalistic = when; }
|
||||
public void setLastFailed(long when) { _lastFailed = when; }
|
||||
******/
|
||||
|
||||
public RateStat getRejectionRate() { return _rejectRate; }
|
||||
public RateStat getFailedRate() { return _failRate; }
|
||||
|
||||
@@ -18,17 +18,17 @@ import net.i2p.router.TunnelInfo;
|
||||
*
|
||||
*/
|
||||
public class TunnelCreatorConfig implements TunnelInfo {
|
||||
protected RouterContext _context;
|
||||
protected final RouterContext _context;
|
||||
/** only necessary for client tunnels */
|
||||
private Hash _destination;
|
||||
private final Hash _destination;
|
||||
/** gateway first */
|
||||
private HopConfig _config[];
|
||||
private final HopConfig _config[];
|
||||
/** gateway first */
|
||||
private Hash _peers[];
|
||||
private final Hash _peers[];
|
||||
private long _expiration;
|
||||
private List<Integer> _order;
|
||||
private long _replyMessageId;
|
||||
private boolean _isInbound;
|
||||
private final boolean _isInbound;
|
||||
private long _messagesProcessed;
|
||||
private volatile long _verifiedBytesTransferred;
|
||||
private boolean _failed;
|
||||
@@ -48,10 +48,6 @@ public class TunnelCreatorConfig implements TunnelInfo {
|
||||
}
|
||||
_isInbound = isInbound;
|
||||
_destination = destination;
|
||||
_messagesProcessed = 0;
|
||||
_verifiedBytesTransferred = 0;
|
||||
_failed = false;
|
||||
_failures = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,8 +26,6 @@ class PooledTunnelCreatorConfig extends TunnelCreatorConfig {
|
||||
}
|
||||
public PooledTunnelCreatorConfig(RouterContext ctx, int length, boolean isInbound, Hash destination) {
|
||||
super(ctx, length, isInbound, destination);
|
||||
_pool = null;
|
||||
_live = false;
|
||||
}
|
||||
|
||||
// calls TestJob
|
||||
|
||||
Reference in New Issue
Block a user