title: How to convert "java.nio.HeapByteBuffer" to String
body: <p>I have a data structure  java.nio.HeapByteBuffer[pos=71098 lim=71102 cap=94870], which I need to convert into Int (in Scala), the conversion might look simple but whatever which I approach , i did not get right conversion. could you please help me?</p>
  
  <p>Here is my code snippet:</p>
  
  <pre><code>val v : ByteBuffer= map.get("company").get
  val utf_str = new String(v, java.nio.charset.StandardCharsets.UTF_8)
  println (utf_str)
  </code></pre>
  
  <p>the output is just "R" ??</p>