]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - jars/icu4j-52_1/tools/misc/src/com/ibm/icu/dev/tool/charsetdet/mbcs/BIG5Tool.java
Upgrade ICU4J.
[Dictionary.git] / jars / icu4j-52_1 / tools / misc / src / com / ibm / icu / dev / tool / charsetdet / mbcs / BIG5Tool.java
similarity index 96%
rename from jars/icu4j-4_8_1_1/tools/misc/src/com/ibm/icu/dev/tool/charsetdet/mbcs/BIG5Tool.java
rename to jars/icu4j-52_1/tools/misc/src/com/ibm/icu/dev/tool/charsetdet/mbcs/BIG5Tool.java
index 540e636ea0e1e06ae1599f7c06d5d37a0d99a304..b6744cb02302026d4b83cc8e75ad6a64eedcff60 100644 (file)
@@ -1,7 +1,7 @@
 /*
  ***********************************************************************
  *
- * Copyright (C) 2006, International Business Machines Corporation and
+ * Copyright (C) 2006-2012, International Business Machines Corporation and
  * others. All Rights Reserved.
  *
  ***********************************************************************
@@ -110,9 +110,10 @@ public class BIG5Tool {
         System.out.println(dir.getName());
         File[] files = dir.listFiles();
         for (i=0; i<files.length; i++) {
+            FileInputStream is = null;
             try {
                 if (files[i].isFile()) {
-                    FileInputStream is = new FileInputStream(files[i]);
+                    is = new FileInputStream(files[i]);
                     fileSize = is.read(buf);
                     if (option_v) {
                         System.out.println(files[i].getPath());
@@ -161,6 +162,15 @@ public class BIG5Tool {
                 System.err.println("Exception:" + e);
 
             }
+            finally {
+                if (is != null) {
+                    try {
+                        is.close();
+                    } catch (Exception e) {
+                        // ignore
+                    }
+                }
+            }
         }
 
         //