code: public static String string(ByteBuffer buffer, Charset charset) throws CharacterCodingException
  	    {
  	        return charset.newDecoder().decode(buffer.duplicate()).toString();
  	    }
docs: Decode a String representation.
  
  @param buffer a byte buffer holding the string representation
  @param charset the String encoding charset
  @return the decoded string