Package org.apache.oodt.cas.protocol.http

Examples of org.apache.oodt.cas.protocol.http.HttpFile


    List<HttpFile> httpFiles = new ArrayList<HttpFile>();
    while (matcher.find()) {
      String link = matcher.group(2).trim();
      String virtualPath = matcher.group(3).trim();
      URL url = resolveUri(file.getLink().toURI(), link).toURL();
      httpFiles.add(new HttpFile(file, link, isDirectory(url, virtualPath), url));
    }
    matcher = LAZY_LINK_PATTERN.matcher(HttpUtils.readUrl(connect(file.getLink())));
    while (matcher.find()) {
      String link = matcher.group(2).trim();
      URL url = resolveUri(file.getLink().toURI(), link).toURL();
      httpFiles.add(new HttpFile(file, link, isDirectory(url, link), url));
    }
    return httpFiles;
  }
View Full Code Here


    assertFalse(matcher.find());
  }
 
  public void testFindLinks() throws MalformedURLException, IOException, URISyntaxException {
    URL url = new URL(APACHE_SVN_SITE + PARENT_URL_OF_THIS_TEST);
    HttpFile parent = new HttpFile(PARENT_URL_OF_THIS_TEST, true, url);
    HttpURLConnection conn = HttpUtils.connect(url);
    List<HttpFile> httpFiles = HttpUtils.findLinks(parent);
    boolean foundThisTest = false;
    for (HttpFile httpFile : httpFiles) {
      if (httpFile.getName().equals("TestHttpUtils.java")) {
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.protocol.http.HttpFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.