Thread t = new Thread() {
@Override
public void run() {
Graph g = new MultiGraph("G");
NetStreamSender nsc = null;
try {
nsc = new NetStreamSender("localhost", 2001);
} catch (UnknownHostException e1) {
error(e1.toString());
return;
} catch (IOException e1) {
error(e1.toString());
return;
}
nsc.setPacker(new Base64Packer());
g.addSink(nsc);
g.addAttribute("intArray", 0, Integer.MAX_VALUE,
Integer.MIN_VALUE);
g.addAttribute("floatArray", 0f, Float.MAX_VALUE,
Float.MIN_VALUE);
g.addAttribute("doubleArray", 0.0, Double.MAX_VALUE,
Double.MIN_VALUE);
g.addAttribute("shortArray", (short) 0, Short.MAX_VALUE,
Short.MIN_VALUE);
g.addAttribute("longArray", 0L, Long.MAX_VALUE, Long.MIN_VALUE);
g.addAttribute("byteArray", (byte) 0, Byte.MAX_VALUE,
Byte.MIN_VALUE);
g.addAttribute("booleanArray", true, false);
// Object[] three = {new Short((short) 3),new Long(3L),"3"};
// g.addAttribute("typeArray","one", 2 , three);
g.addAttribute("int", 1);
g.addAttribute("float", 1f);
g.addAttribute("double", 1.0);
g.addAttribute("short", (short) 0);
g.addAttribute("long", 1L);
g.addAttribute("byte", (byte) 0);
g.addAttribute("boolean", true);
g.addAttribute("string", "true");
try {
nsc.close();
} catch (IOException e) {
e.printStackTrace();