From d17e132bd72e8429f42d865d29dfce4d2a6095f3 Mon Sep 17 00:00:00 2001 From: zapata Date: Thu, 3 Jul 2003 22:50:24 +0000 Subject: [PATCH] experimental config tool app --- source/tool/ConfigTool.java | 96 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100755 source/tool/ConfigTool.java diff --git a/source/tool/ConfigTool.java b/source/tool/ConfigTool.java new file mode 100755 index 00000000..c6e16196 --- /dev/null +++ b/source/tool/ConfigTool.java @@ -0,0 +1,96 @@ +package tool; + +import java.security.MessageDigest; +import java.util.TimeZone; + +import gnu.regexp.RE; +import mir.util.StringRoutines; + +/** + *

Title:

+ *

Description:

+ *

Copyright: Copyright (c) 2003

+ *

Company:

+ * @author not attributable + * @version 1.0 + */ + +public class ConfigTool { + public ConfigTool() { + } + + public static void timezone(String aSpecification) { + try { + RE specification = new RE(aSpecification); + String[] timeZoneIds = TimeZone.getAvailableIDs(); + + System.out.println("ID\tOffset\tDST?\tName"); + for (int i=0; i= 1) { + command = anArguments[0]; + + if (command.equals("timezone")) { + if (anArguments.length<=2) { + if (anArguments.length==2) + timezone(anArguments[1]); + else + timezone(".*"); + } + + return; + } + else if (command.equals("digest")) { + if (anArguments.length == 3) { + digest(anArguments[1], anArguments[2]); + + return; + } + } + } + + + + System.out.println("Usage:"); + + System.out.println(" ConfigTool timezone [regexp]"); + System.out.println(""); + System.out.println(" Shows the available timezones"); + System.out.println(""); + System.out.println(" BundleTool digest "); + System.out.println(""); + System.out.println(" Calculates the digest of a string."); + System.out.println(""); + } +} \ No newline at end of file -- 2.11.0