code: public static String readToString(InputStream inputStream, Charset charset) throws IOException {
          return new String(FileCopyUtils.copyToByteArray(inputStream), charset);
      }
docs: Read file input stream to string value.
  @param inputStream
  @param charset
  @return
  @throws IOException