code: public static String fromInputStream(InputStream inputStream) throws IOException {
      if (inputStream == null) {
        return null;
      }
  
      try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, ENCODING_CHARSET))) {
        StringBuilder response = new StringBuilder();
  
        String line;
        while ((line = reader.readLine()) != null) {
          response.append(line);
        }
  
        return response.toString();
      }
    }
docs: Builds and returns a string representation of the given {@code inputStream} .
  
  @param inputStream
  The stream from which a string representation is built.
  
  @return A string representation of the given {@code inputStream}.
  @throws IOException
  If an error occurs while processing the {@code inputStream}.