static String stringFromPacket(DatagramPacket packet){
  return new String(packet.getData(),0,packet.getLength());
}

static String stringFromPacket ( DatagramPacket packet ) { return new String ( packet . getData ( ) , 0 , packet . getLength ( ) ) ; }
converts a given datagram packet ' s contents to a string .
