title: How to convert from ByteBuffer to Integer and String?
body: <p>I converted an <code>int</code> to a byte array using ByteBuffer's  <code>putInt()</code> method. How do I do the opposite? So convert those bytes to an int?</p>
  
  <p>Furthermore, I converted a string to an array of bytes using the String's <code>getBytes()</code> method. How do I convert it the other way round? The <code>bytesArray.getString()</code> does not return a readable string. I get things like <code>BF@DDAD</code></p>