title: short to int cast, weird behaviour
body: <p>I currently read from a ByteBuffer a short value and apply it to an int.</p>
  
  <pre><code>byte[] data = new byte{0x90, 0xAF};
  ByteBuffer b = ByteBuffer.wrap(data);
  int value = b.getShort();
  </code></pre>
  
  <p>but the <code>value</code> contains now <code>0xFFFF90AF</code> and not <code>0x90AF</code>. 
  My solution is to bitmask the value by <code>0xFFFF</code>: <code>int value = b.getShort() &amp; 0xFFFF;</code></p>
  
  <p>I thought that a upcast is always possible, because <code>short</code> is smaller than <code>int</code>. Can someone explain why it behaves like this?</p>