]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/text/BreakDictionary.java
Upgrade ICU4J.
[Dictionary.git] / jars / icu4j-52_1 / main / classes / core / src / com / ibm / icu / text / BreakDictionary.java
similarity index 95%
rename from jars/icu4j-4_8_1_1/main/classes/core/src/com/ibm/icu/text/BreakDictionary.java
rename to jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/text/BreakDictionary.java
index dbc710c0a2fbcac706dc2cb10107f77afefd7b0d..66068f585b294f5a24c28f5eec03ac0218f701fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- * Copyright (C) 1996-2010, International Business Machines Corporation and    *
+ * Copyright (C) 1996-2012, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -33,18 +33,27 @@ class BreakDictionary {
     //=================================================================================
     // testing and debugging
     //=================================================================================
+
+//    public static void main(String... args) {
+//        String inFile = args[0];
+//        String outFile = args.length >= 2 ? args[1] : null;
+//        try {
+//            writeToFile(inFile, outFile);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//    }
+
     ///CLOVER:OFF
-    //The main method looks like it was useful once but now seems worthless. It is not used by any method or class.
-    public static void main(String args[])
+    static void writeToFile(String inFile, String outFile)
             throws FileNotFoundException, UnsupportedEncodingException, IOException {
-        String filename = args[0];
 
-        BreakDictionary dictionary = new BreakDictionary(new FileInputStream(filename));
+        BreakDictionary dictionary = new BreakDictionary(new FileInputStream(inFile));
 
         PrintWriter out = null;
 
-        if(args.length >= 2) {
-            out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(args[1]), "UnicodeLittle"));
+        if(outFile != null) {
+            out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(outFile), "UnicodeLittle"));
         }
 
         dictionary.printWordList("", 0, out);