title: Decode C structure Datagram packet in java through UDP
body: <p><b>Here is my java code for Android app:</b>  </p>
  
  <pre><code>InetAddress address = InetAddress.getByName("192.168.x.xxx");
  int port = xxx;
  DatagramPacket p = new DatagramPacket(buffer, buffer.length, address, port);
  DatagramSocket ds = new DatagramSocket(port);
  ds.receive(p);
  Log.d("..........","Packet Received");
  Log.d("UDP", "Received: '" + new String(p.getData()).trim() + "'");
  </code></pre>
  
  <p>I am able to receive packets but I am not able to decode in correct manner. On other side I am sending packet in structure (C program). I do not have right to change server code, so I need to decode that server structure packet into java object ?? Thanks in Advance.</p>