]> granicus.if.org Git - icu/commitdiff
ICU-8976 Commented out unnecessary main() in com.ibm.icu.text.BreakDictionary and...
authorYoshito Umaoka <y.umaoka@gmail.com>
Mon, 16 Jan 2012 23:30:55 +0000 (23:30 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Mon, 16 Jan 2012 23:30:55 +0000 (23:30 +0000)
X-SVN-Rev: 31211

icu4j/main/classes/core/src/com/ibm/icu/impl/duration/impl/Utils.java
icu4j/main/classes/core/src/com/ibm/icu/text/BreakDictionary.java

index d2ac08a36e6ddbc1549b6471f49876ad36739b17..3bb44f92e2ee7883fd7131e5e117bd5e9a995164 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ******************************************************************************
-* Copyright (C) 2007, International Business Machines Corporation and   *
+* Copyright (C) 2007-2012, International Business Machines Corporation and   *
 * others. All Rights Reserved.                                               *
 ******************************************************************************
 */
@@ -173,15 +173,15 @@ public class Utils {
     return new String(buf, x, w-x);
   }
 
-  public static void main(String[] args) {
-    for (int i = 0; i < args.length; ++i) {
-      String arg = args[i];
-      System.out.print(arg);
-      System.out.print(" > ");
-      long n = Long.parseLong(arg);
-      System.out.println(chineseNumber(n, ChineseDigits.DEBUG));
-    }
-  }
+//  public static void main(String[] args) {
+//    for (int i = 0; i < args.length; ++i) {
+//      String arg = args[i];
+//      System.out.print(arg);
+//      System.out.print(" > ");
+//      long n = Long.parseLong(arg);
+//      System.out.println(chineseNumber(n, ChineseDigits.DEBUG));
+//    }
+//  }
 
   public static class ChineseDigits {
     final char[] digits;
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);