diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/PersistDHT.java b/apps/i2psnark/java/src/org/klomp/snark/dht/PersistDHT.java
index c690bc340a26e946c9e25f8d35829f5c0fe9b1a9..8ecd111ef7b5ddbef82caf7e1683f9f969fb9788 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/dht/PersistDHT.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/dht/PersistDHT.java
@@ -37,10 +37,10 @@ abstract class PersistDHT {
     public static synchronized void loadDHT(KRPC krpc, File file) {
         Log log = I2PAppContext.getGlobalContext().logManager().getLog(PersistDHT.class);
         int count = 0;
-        FileInputStream in = null;
+        BufferedReader br = null;
         try {
-            in = new FileInputStream(file);
-            BufferedReader br = new BufferedReader(new InputStreamReader(in, "ISO-8859-1"));
+            br = new BufferedReader(new InputStreamReader(
+            		new FileInputStream(file), "ISO-8859-1"));
             String line = null;
             while ( (line = br.readLine()) != null) {
                 if (line.startsWith("#"))
@@ -61,7 +61,7 @@ abstract class PersistDHT {
             if (log.shouldLog(Log.WARN) && file.exists())
                 log.warn("Error reading the DHT File", ioe);
         } finally {
-            if (in != null) try { in.close(); } catch (IOException ioe) {}
+            if (br != null) try { br.close(); } catch (IOException ioe) {}
         }
         if (log.shouldLog(Log.INFO))
             log.info("Loaded " + count + " nodes from " + file);
diff --git a/apps/sam/java/src/net/i2p/sam/SAMBridge.java b/apps/sam/java/src/net/i2p/sam/SAMBridge.java
index 27f2af5a856d6b6dbde1c016a9690522d4792a70..102c27fa09584d8e70e94dae17f1a252148703e9 100644
--- a/apps/sam/java/src/net/i2p/sam/SAMBridge.java
+++ b/apps/sam/java/src/net/i2p/sam/SAMBridge.java
@@ -214,12 +214,12 @@ public class SAMBridge implements Runnable, ClientApp {
     private void loadKeys() {
         synchronized (nameToPrivKeys) {
             nameToPrivKeys.clear();
-            FileInputStream in = null;
+            BufferedReader br = null;
             try {
-                in = new FileInputStream(persistFilename);
-                BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+                br = new BufferedReader(new InputStreamReader(
+                        new FileInputStream(persistFilename)));
                 String line = null;
-                while ( (line = reader.readLine()) != null) {
+                while ( (line = br.readLine()) != null) {
                     int eq = line.indexOf('=');
                     String name = line.substring(0, eq);
                     String privKeys = line.substring(eq+1);
@@ -230,7 +230,7 @@ public class SAMBridge implements Runnable, ClientApp {
             } catch (IOException ioe) {
                 _log.error("Unable to read the keys from " + persistFilename, ioe);
             } finally {
-                if (in != null) try { in.close(); } catch (IOException ioe) {}
+                if (br != null) try { br.close(); } catch (IOException ioe) {}
             }
         }
     }
diff --git a/router/java/src/net/i2p/router/Blocklist.java b/router/java/src/net/i2p/router/Blocklist.java
index 4c3b8407b48188984d2bc0f714f19ae71e4c203e..66617507bb1b46f6799f145412fbf1e11e03715e 100644
--- a/router/java/src/net/i2p/router/Blocklist.java
+++ b/router/java/src/net/i2p/router/Blocklist.java
@@ -215,10 +215,10 @@ public class Blocklist {
         int badcount = 0;
         int peercount = 0;
         long ipcount = 0;
-        FileInputStream in = null;
+        BufferedReader br = null;
         try {
-            in = new FileInputStream(BLFile);
-            BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+            br = new BufferedReader(new InputStreamReader(
+                    new FileInputStream(BLFile), "UTF-8"));
             String buf = null;
             while ((buf = br.readLine()) != null && count < maxSize) {
                 Entry e = parse(buf, true);
@@ -247,7 +247,7 @@ public class Blocklist {
             _log.log(Log.CRIT, "OOM reading the blocklist");
             return;
         } finally {
-            if (in != null) try { in.close(); } catch (IOException ioe) {}
+            if (br != null) try { br.close(); } catch (IOException ioe) {}
         }
 
         if (_wrapSave != null) {
@@ -405,10 +405,10 @@ public class Blocklist {
     private int getSize(File BLFile) {
         if ( (!BLFile.exists()) || (BLFile.length() <= 0) ) return 0;
         int lines = 0;
-        FileInputStream in = null;
+        BufferedReader br = null;
         try {
-            in = new FileInputStream(BLFile);
-            BufferedReader br = new BufferedReader(new InputStreamReader(in, "ISO-8859-1"));
+            br = new BufferedReader(new InputStreamReader(
+                    new FileInputStream(BLFile), "ISO-8859-1"));
             while (br.readLine() != null) {
                 lines++;
             }
@@ -417,7 +417,7 @@ public class Blocklist {
                 _log.warn("Error reading the BLFile", ioe);
             return 0;
         } finally {
-            if (in != null) try { in.close(); } catch (IOException ioe) {}
+            if (br != null) try { br.close(); } catch (IOException ioe) {}
         }
         return lines;
     }
@@ -770,10 +770,10 @@ public class Blocklist {
         for (Iterator<byte[]> iter = ips.iterator(); iter.hasNext(); ) {
             byte ip[] = iter.next();
             int ipint = toInt(ip);
-            FileInputStream in = null;
+            BufferedReader br = null;
             try {
-                in = new FileInputStream(BLFile);
-                BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+                br = new BufferedReader(new InputStreamReader(
+                        new FileInputStream(BLFile), "UTF-8"));
                 String buf = null;
                 // assume the file is unsorted, so go through the whole thing
                 while ((buf = br.readLine()) != null) {
@@ -782,7 +782,7 @@ public class Blocklist {
                         continue;
                     }
                     if (match(ipint, toEntry(e.ip1, e.ip2))) {
-                        try { in.close(); } catch (IOException ioe) {}
+                        try { br.close(); } catch (IOException ioe) {}
                         String reason = _x("IP banned by blocklist.txt entry {0}");
                         // only one translate parameter for now
                         //for (int i = 0; i < 4; i++) {
@@ -801,7 +801,7 @@ public class Blocklist {
                 if (_log.shouldLog(Log.WARN))
                     _log.warn("Error reading the BLFile", ioe);
             } finally {
-                if (in != null) try { in.close(); } catch (IOException ioe) {}
+                if (br != null) try { br.close(); } catch (IOException ioe) {}
             }
         }
         // We already banlisted in banlist(peer), that's good enough
diff --git a/router/java/src/net/i2p/router/MultiRouter.java b/router/java/src/net/i2p/router/MultiRouter.java
index 8d5f381eac7081ab926b014bd41d23c11821dbd3..6e4346807397289b1ba03ba7f2912d7cd2ced4de 100644
--- a/router/java/src/net/i2p/router/MultiRouter.java
+++ b/router/java/src/net/i2p/router/MultiRouter.java
@@ -67,13 +67,16 @@ public class MultiRouter {
         Scanner scan = new Scanner(args[0]);
         if (!scan.hasNextInt()) {
             usage();
+            scan.close();
             return;
         }
         nbrRouters = scan.nextInt();
         if (nbrRouters < 0) {
             usage();
+            scan.close();
             return;
         }
+        scan.close();
         
         _out = System.out;
 
diff --git a/router/java/src/net/i2p/router/transport/GeoIP.java b/router/java/src/net/i2p/router/transport/GeoIP.java
index cad3654c0298dcd309502e26dee25a56f14c2799..3f0990dd3bdfdf2bdebfe2094643ae75420777bd 100644
--- a/router/java/src/net/i2p/router/transport/GeoIP.java
+++ b/router/java/src/net/i2p/router/transport/GeoIP.java
@@ -194,10 +194,10 @@ class GeoIP {
                 _log.warn("Country file not found: " + geoFile.getAbsolutePath());
             return;
         }
-        FileInputStream in = null;
+        BufferedReader br = null;
         try {
-            in = new FileInputStream(geoFile);
-            BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+            br = new BufferedReader(new InputStreamReader(
+                    new FileInputStream(geoFile), "UTF-8"));
             String line = null;
             while ( (line = br.readLine()) != null) {
                 try {
@@ -215,7 +215,7 @@ class GeoIP {
             if (_log.shouldLog(Log.ERROR))
                 _log.error("Error reading the Country File", ioe);
         } finally {
-            if (in != null) try { in.close(); } catch (IOException ioe) {}
+            if (br != null) try { br.close(); } catch (IOException ioe) {}
         }
     }
 
@@ -256,11 +256,11 @@ class GeoIP {
         String[] rv = new String[search.length];
         int idx = 0;
         long start = _context.clock().now();
-        FileInputStream in = null;
+        BufferedReader br = null;
         try {
-            in = new FileInputStream(geoFile);
             String buf = null;
-            BufferedReader br = new BufferedReader(new InputStreamReader(in, "ISO-8859-1"));
+            br = new BufferedReader(new InputStreamReader(
+                    new FileInputStream(geoFile), "ISO-8859-1"));
             while ((buf = br.readLine()) != null && idx < search.length) {
                 try {
                     if (buf.charAt(0) == '#') {
@@ -288,7 +288,7 @@ class GeoIP {
             if (_log.shouldLog(Log.ERROR))
                 _log.error("Error reading the geoFile", ioe);
         } finally {
-            if (in != null) try { in.close(); } catch (IOException ioe) {}
+            if (br != null) try { br.close(); } catch (IOException ioe) {}
         }
 
         if (_log.shouldLog(Log.INFO)) {
diff --git a/router/java/src/net/i2p/router/transport/GeoIPv6.java b/router/java/src/net/i2p/router/transport/GeoIPv6.java
index f26e33a7eb2042709c0e0c53991241b697b5fc27..b93e3f004f9536c471811a90cd553ea353c51c9d 100644
--- a/router/java/src/net/i2p/router/transport/GeoIPv6.java
+++ b/router/java/src/net/i2p/router/transport/GeoIPv6.java
@@ -158,12 +158,13 @@ class GeoIPv6 {
         for (File geoFile : inFiles) {
             int count = 0;
             InputStream in = null;
+            BufferedReader br = null;
             try {
                 in = new BufferedInputStream(new FileInputStream(geoFile));
                 if (geoFile.getName().endsWith(".gz"))
                     in = new GZIPInputStream(in);
                 String buf = null;
-                BufferedReader br = new BufferedReader(new InputStreamReader(in, "ISO-8859-1"));
+                br = new BufferedReader(new InputStreamReader(in, "ISO-8859-1"));
                 while ((buf = br.readLine()) != null) {
                     try {
                         if (buf.charAt(0) == '#') {
@@ -191,6 +192,7 @@ class GeoIPv6 {
                 return false;
             } finally {
                 if (in != null) try { in.close(); } catch (IOException ioe) {}
+                if (br != null) try { br.close(); } catch (IOException ioe) {}
             }
         }
         Collections.sort(entries);
diff --git a/router/java/src/net/i2p/router/util/EventLog.java b/router/java/src/net/i2p/router/util/EventLog.java
index 1f07f7f7d689176bed8ca86f0c5922213a01a57d..1e6f166f8beccbafb41823b1062da6ccec895c76 100644
--- a/router/java/src/net/i2p/router/util/EventLog.java
+++ b/router/java/src/net/i2p/router/util/EventLog.java
@@ -3,7 +3,6 @@ package net.i2p.router.util;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -116,10 +115,10 @@ public class EventLog {
             }
         }
         rv = new TreeMap<Long, String>();
-        InputStream in = null;
+        BufferedReader br = null;
         try {
-            in = new FileInputStream(_file);
-            BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+            br = new BufferedReader(new InputStreamReader(
+                    new FileInputStream(_file), "UTF-8"));
             String line = null;
             while ( (line = br.readLine()) != null) {
                 try {
@@ -141,7 +140,7 @@ public class EventLog {
             _cacheTime.put(event, Long.valueOf(since));
         } catch (IOException ioe) {
         } finally {
-            if (in != null) try { in.close(); } catch (IOException ioe) {}
+            if (br != null) try { br.close(); } catch (IOException ioe) {}
         }
         return rv;
     }