title: BigInteger to byte[]
body: <p>I need to convert a Java <a href="http://download.oracle.com/javase/6/docs/api/java/math/BigInteger.html" rel="noreferrer">BigInteger</a> instance to its value in bytes. From the API, I get this method <code>toByteArray()</code>, that returns a byte[] containing the two's-complement representation of this BigInteger.</p>
  
  <p>Since all my numbers are positive 128 bits (16 bytes) integer, I don't need the 2's-complement form that give me 128 bits + sign bit (129 bits)...</p>
  
  <p>Is there a way to get the standard (without the 2's-complement form) representation directly from a BigInteger?</p>
  
  <p>If not, how can I right shift the whole byte[17] array to lose the sign bit in order to get a byte[16] array?</p>