title: How to efficiently convert byte array to string
body: <p>I have a byte array of 151 bytes which is typically a record, The record needs to inserted in to a oracle database. In 151 byte of array range from 0 to 1 is a record id , 2 to 3 is an reference id , 4 to 9 is a date value. The following data in an byte array is a date value. i want to convert it to string </p>
  
  <pre><code>byte[] b= {48,48,49,48,48,52};  // when converted to string it becomes 10042. 
  
  new String(b);  // current approach
  </code></pre>
  
  <p>is there any way to  efficiently to convert byte array of some range (<code>Arrays.copyOfRange(b,0,5)</code>) to string .</p>