Maven 2 is used for hosting the releases. Maven Central should have all the releases available. Just add a dependency to your pom like the following:
<dependency> <groupId>net.sourceforge.chopchophttpclient</groupId> <artifactId>chopchophttpclient</artifactId> <version>X.Y.Z</version> </dependency>
If you don't have Maven you may access the jars manually via http://chop-chophttpcl.sourceforge.net/maven2/net/sourceforge/chopchophttpclient/chopchophttpclient/.
Don't forget to look at the chopchophttpclient-x.y.z.pom for needed dependencies.
The SourceForge.net project page can be accessed via https://sourceforge.net/projects/chop-chophttpcl/. See that page for the bug tracker and news.
//We must setup logging for HttpClient, otherwise it will get 16x slower due to it wasting time
// trying to log and catching errors internally [rbeede, 2008-11]
Logger.getLogger("org.apache.commons.httpclient").setLevel(Level.DEBUG);
Logger.getLogger("httpclient.wire").setLevel(Level.OFF); //really slow!
final URI[] uris = new URI[] {new URI("http://www.rodneybeede.com"), new URI("https://sourceforge.net/projects/chop-chophttpcl/")};
System.out.println("Current working directory: " + CWD.getAbsolutePath());
System.out.println();
final File[] files = new File[] {new File("file1"), new File("file1")};
System.out.println();
System.out.println("Commencing download of " + uris.length + " URIs...");
// You can also just pass null for username/password/domain
// You can also specify a proxy server username/password/domain
// The last argument is useful for GUIs that need to display progress
final Client client = new Client("username", "password", "ntlm domain", new EnvironmentProxySelector(), null, null, null, null);
// You could also have passed in an array of OutputStream instead of files
// The passed in files will be given last modified dates matching what the server gave
final DownloadResult[] downloadResults = client.download(uris, files, null);
for(DownloadResult downloadResult : downloadResults) {
if(downloadResult.getServerResponseCode() != 200) {
System.err.println(downloadResult.getURI() + " failed");
}
}
See the ChopchopHTTPClient class in the source for a more complete example.
Contact sourceforge+cchc -@AT- rodneybeede.com (change the -@AT- for spam prevention) or comment on the project forums if you have usage questions.