title: Java integer to fixed length byte array
body: <p>How can I convert an integer between 0 and 65k to fixed length of two bytes? as an example </p>
  
  <p>2   would be <code>00000000 00000010</code></p>
  
  <p>~65k would be <code>11111111 11111111</code></p>
  
  <p>and all that in a byte array</p>