code: public static String getExtension(ResourceHandle resource, String extension) {
          return getExtension(resource, extension, false);
      }
docs: Returns the extension for a URL to a resource based on a predefined value (can be null or '').
  The result is always not 'null' and can be added without check; it starts with a '.' if not blank.
  
  @param resource  the referenced resource
  @param extension the predefined extension (can be 'null' or blank for determination)
  @return the string which has to add to the resources path; '' if nothing should add