We even use the stop method on the group in order to stop all the threads. We implement an action listener interface to allow several classes to listen to the search results. The method wakeupSleepingThreads is declared synchronized. This is in order to prevent other threads from entering that method. I had a problem with other threads terminating while that method was running.
Garbage collection is invoked manually.
As you see java.new makes working with URLs and the Internet practically invisible, thus classes can use streams and be unaware of the underlying protocol being used. I only showed a fraction of what java.net is capable of. We store an entire file in one String. The limit of length on a string is quite high and it should not pose a problem. I did not check though into the subject of its efficiency.