code: public static String readContentAsString(URL url, String encoding) {
          try {
              return readContentAsString(url.openStream());
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }
docs: Read file content to a String
  
  @param url The url resource to read
  @return The String content