1 25 package org.archive.net.rsync; 26 27 import java.io.File ; 28 import java.net.URL ; 29 30 import org.archive.net.DownloadURLConnection; 31 32 37 public class RsyncURLConnection extends DownloadURLConnection { 38 private final String RSYNC_TIMEOUT = 39 System.getProperty(RsyncURLConnection.class.getName() + ".timeout", 40 "300"); 41 42 protected RsyncURLConnection(URL u) { 43 super(u); 44 } 45 46 protected String getScript() { 47 return System.getProperty(this.getClass().getName() + ".path", 48 "rsync"); 49 } 50 51 @Override  52 protected String [] getCommand(final URL thisUrl, 53 final File downloadFile) { 54 return new String [] {getScript(), "--timeout=" + RSYNC_TIMEOUT, 55 this.url.getPath(), downloadFile.getAbsolutePath()}; 56 } 57 } 58 | Popular Tags |