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