1 45 package org.openejb.server.telnet; 46 47 import java.io.DataInputStream ; 48 import java.io.IOException ; 49 import java.io.PrintStream ; 50 import java.util.HashMap ; 51 import java.util.Iterator ; 52 import java.util.Set ; 53 54 57 public class Help extends Command { 58 59 public static void register() { 60 Command.register("help", Help.class); 61 } 62 63 public void exec(Arguments args, DataInputStream in, PrintStream out) throws IOException { 64 HashMap hash = Command.commands; 65 Set set = hash.keySet(); 66 Iterator cmds = set.iterator(); 67 while (cmds.hasNext()) { 68 out.print(" "+cmds.next()); 69 out.println(""); 70 } 71 72 } 73 74 } 75 76 | Popular Tags |