1 45 package org.openejb.server.telnet; 46 47 import java.io.DataInputStream ; 48 import java.io.FileInputStream ; 49 import java.io.IOException ; 50 import java.io.InputStream ; 51 import java.io.PrintStream ; 52 53 56 public class Test extends Command { 57 58 public static void _DONT_register() { 59 Command.register("test", Test.class); 60 } 61 62 public void exec(Arguments args, DataInputStream in, PrintStream out) throws IOException { 63 try{ 64 65 InputStream file = new FileInputStream ("print.txt"); 66 int b = file.read(); 67 while (b != -1) { 68 out.write(b); 69 b = file.read(); 70 } 71 72 } catch (Exception e){ 73 e.printStackTrace(); 74 } 75 } 76 77 } 78 79 | Popular Tags |