com.macromedia.net
Class JGet
java.lang.Object
com.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 |
JGet
public JGet()
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 lineoutputDir - is where to write that data we got
back from the responselog - 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 toresults - is a map of our resultsstart - is when we started the testend - is when the test ended
main
public static final void main(java.lang.String[] args)