com.macromedia.net
Class JGet

java.lang.Object
  extended bycom.macromedia.net.JGet

public class JGet
extends java.lang.Object

A toy wget wannabe written in Java. You Give it a file of URLs, a number of threads and it goes out and gets all the data. What could be easier?


Constructor Summary
JGet()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 java.util.Map process(int threadCount, java.io.BufferedReader urls, java.lang.String outputDir, java.io.PrintStream log)
          Process a bunch of requests and return the URL responses.
 void summarize(java.io.PrintStream log, java.util.Map results, long start, long end)
          Summarize our results
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGet

public JGet()
Method Detail

process

public java.util.Map process(int threadCount,
                             java.io.BufferedReader urls,
                             java.lang.String outputDir,
                             java.io.PrintStream log)
                      throws java.lang.Exception
Process a bunch of requests and return the URL responses.

Parameters:
urls - is a stream with a URL per line
outputDir - is where to write that data we got back from the response
log - is a place to log errors to
Returns:
a collection of responses
Throws:
java.lang.Exception

summarize

public void summarize(java.io.PrintStream log,
                      java.util.Map results,
                      long start,
                      long end)
Summarize our results

Parameters:
log - is where to log the info to
results - is a map of our results
start - is when we started the test
end - is when the test ended

main

public static final void main(java.lang.String[] args)