private static FileObject extractHttpFileObject(String link, URL url) throws FileSystemException, URISyntaxException {
    FileObject child;
    LOGGER.info("Extracting {} from URL {}", link, url);
    if (link.startsWith("/")) {

      URI uri = url.toURI();

      String host = uri.getHost();
      int port = uri.getPort();
      if (port != -1) {
        child = resolveFileObject(String.format("%s://%s:%s%s", url.getProtocol(), host, port, link));
      } else {
        child = resolveFileObject(String.format("%s://%s%s", url.getProtocol(), host, link));
      }
    } else if (link.matches("(http|https|smb|ftp|sftp)://.*")) {
      child = resolveFileObject(link);
    } else {
      child = resolveFileObject(url + "/" + link);
    }
    return child;
  }
Returns whether a folder contains a given file

@param folder A folder
@param file   A file
@return whether a folder contains a given file
olv-vfs/src/main/java/pl/otros/vfs/browser/util/VFSUtils.java