1 24 25 27 package weblech.spider; 28 29 import java.net.URL ; 30 31 public class URLToDownload implements java.io.Serializable 32 { 33 private final URL url; 34 private final URL referer; 35 private final int depth; 36 37 public URLToDownload(URL url, int depth) 38 { 39 this(url, null, depth); 40 } 41 42 public URLToDownload(URL url, URL referer, int depth) 43 { 44 this.url = url; 45 this.referer = referer; 46 this.depth = depth; 47 } 48 49 public URL getURL() 50 { 51 return url; 52 } 53 54 public URL getReferer() 55 { 56 return referer; 57 } 58 59 public int getDepth() 60 { 61 return depth; 62 } 63 64 public String toString() 65 { 66 return url + ", referer " + referer + ", depth " + depth; 67 } 68 } 69 | Popular Tags |