System.out.println("Usage: TreePanel msg_file_name");
System.exit(1);
}
try {
PipeParser parser = new PipeParser();
File messageFile = new File(args[0]);
long fileLength = messageFile.length();
FileReader r = new FileReader(messageFile);
char[] cbuf = new char[(int)fileLength];
System.out.println("Reading message file ... " + r.read(cbuf) + " of " + fileLength + " chars");
r.close();
String messString = String.valueOf(cbuf);
Message mess = parser.parse(messString);
System.out.println("Got message of type " + mess.getClass().getName());
showInNewWindow(mess);
//write message to console ...
System.out.println(parser.encode(mess, "VB"));
} catch (Exception e) {
e.printStackTrace();
log.error( e.getMessage(), e );
}
}