title: Fast conversion of byte[] containing ascii string to int/double/date, etc. without new String
body: <p>I get FIX message string (ASCII) as ByteBuffer. I parse tag value pairs and store values as primitive objects in the treemap with tag as key. So I need to convert byte[] value to int/double/date, etc. depending on its type.</p>
  
  <p>Simplest way is to create new String and pass it to standard converter functions. e.g. </p>
  
  <pre><code>int convertToInt(byte[] buffer, int offset, int length)
  {
    String valueStr = new String(buffer, offset, length);
    return Integer.parseInt(valueStr);
  }
  </code></pre>
  
  <p>I understand that in Java, creating new object is very inexpensive, still is there any way to convert this ascii byte[] to primitive type directly. I tried hand written functions to do so, but found it to be time consuming and didn't result in better performance.</p>
  
  <p>Are there any third party libraries for doing so and most of all is it worth doing?</p>