docs: public static String getExtension(String path)
    {
      if(path == null) {
        return null;
      }
  
      // search for both Unix and Windows path separators because this logic is common for files and URLs
  
      int extensionPos = path.lastIndexOf(EXTENSION_SEPARATOR);
      int lastUnixPos = path.lastIndexOf(UNIX_SEPARATOR);
      int lastWindowsPos = path.lastIndexOf(WINDOWS_SEPARATOR);
      int lastSeparatorPos = Math.max(lastUnixPos, lastWindowsPos);
  
      // do not consider extension separator before last path separator, e.g. /etc/rc.d/file
      int i = (lastSeparatorPos > extensionPos ? -1 : extensionPos);
      return i == -1 ? "" : path.substring(i + 1).toLowerCase();
    }