title: c++ server htons to java ntohs client conversion
body: <p>I am creating a small TFTP client
   server app where server is developed
   using c++ and client using java.</p>
  
  <p>Here i am sending "block count" value
   using  <code>htons</code> conversion.</p>
  
  <p>But i am not able to convert it back
   to its original value at client.</p>
  
  <p>For example if am sending block count
   <code>ntohs(01)</code> (2 bytes) from server to
   client. Client is reading in bytes.
   Value which I am receiving is byte 0
   and byte 1.</p>
  
  <p>Please if any one can provide a
   solution.</p>