title: Gets byte array from a ByteBuffer in java
body: <p>Is this the recommended way to get the bytes from the ByteBuffer</p>
  
  <pre><code>ByteBuffer bb =..
  
  byte[] b = new byte[bb.remaining()]
  bb.get(b, 0, b.length);
  </code></pre>