code: public static String readResourceAsString(Class<?> classObj,
              String resourceName) throws IOException {
          if (classObj == null) {
              classObj = IOUtil.class;
          }
          if (resourceName == null) {
              return null;
          }
          
          StringBuilder textBuilder = new StringBuilder();
          try (Reader reader = new BufferedReader(new InputStreamReader(classObj.getResourceAsStream(resourceName)))) {
              int c;
              while ((c = reader.read()) != -1) {
                  textBuilder.append((char) c);
              }
          }
          return textBuilder.toString();
      }
docs: Reads everything from the given resource into a <code>String</code> using
  the default character set.
  
  @param classObj the <code>Class</code> from which
  <code>Class.getResourceAsStream</code> is invoked. If <code>null</code>,
  will use <code>IOUtil.class</code>.
  @param resourceName a resource name <code>String</code>.
  @return a <code>String</code>, or <code>null</code> if
  <code>resourceName</code> is <code>null</code>.
  @throws IOException if the resource cannot be found or if there is an
  error reading from it.