public static final int PORT = 2566;
/** */
public static void main(String[] args) throws Exception
{
Wiser wiser = new Wiser();
wiser.setHostname("localhost");
wiser.setPort(PORT);
wiser.start();
String line;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
do
{
line = in.readLine();
line = line.trim();
if ("dump".equals(line));
wiser.dumpMessages(System.out);
if (line.startsWith("dump "))
{
line = line.substring("dump ".length());
File f = new File(line);
OutputStream out = new FileOutputStream(f);
wiser.dumpMessages(new PrintStream(out));
out.close();
}
}
while (!"quit".equals(line));
wiser.stop();
}