} catch (IOException e1) {
e1.printStackTrace();
System.exit(0);
}
f.addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e){
new TestBinary(buffer,args[0]);
}
});
f.pack();
f.show();
}
else{
JFrame f=new JFrame("Reading Binary Socket");
LoggingBufferPanel lp=new LoggingBufferPanel(f,"test",null);
f.getContentPane().add(lp);
final LoggingEntryByteBuffer buffer=lp.getBuffer();
try {
buffer.openServer(4321);
((LoggingBufferTableModel)lp.getLogbookModel()).startRefreshLoop();
} catch(IOException ie){
ie.printStackTrace();
System.exit(0);
}
Logger lr = null;
try {
SocketBufferHandler sbh=new SocketBufferHandler("localhost",4321);
lr=Logger.getLogger("TEST");
lr.addHandler(sbh);
lr.setUseParentHandlers(false);
lr.warning("Start");
} catch (IOException e) {
e.printStackTrace();
System.exit(0);
}
f.addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e){
try {
buffer.closeServer();
} catch (IOException e1) {
e1.printStackTrace();