byte[] data = new byte[packet.getLength()];
System.arraycopy(packet.getData(), 0, data, 0, packet.getLength());
try {
String s = new String(data, "ASCII");
System.out.println(packet.getAddress() + " at port "
+ packet.getPort() + " says " + s);
}
catch (java.io.UnsupportedEncodingException e) {
}