You can only read from a stream one time, the stream does not reset itself.
You have only three underlying streams in your code. Both times you call url.openStream() a new connection to the URL is made and a new stream is generated, which is used as a source stream for your InputStreamReader/BufferedReader wrappers. Then you make a single, new FileInputStream and use that single stream as the source for two InputStreamReader/BufferedReader wrappers. Because they both delegate to the same FileInputStream you won't be able to read from the second wrapper - the stream has already been depleted.
You may be able to reset() the stream, if BufferedReader, InputStreamReader, and FileInputStream support reset()ing (more appropriately if they support marking, which you can test by calling markSupported()) and be able to read from the FileInputStream again.
Or you are better off cutting your number of reads in half - just read from the URL and the File once, filling a List<String> with the results and converting the List<String> to an array after you are finished reading. It will be much more efficient that way.
[ October 08, 2008: Message edited by: Steve Luke ]
Joined: Oct 08, 2008
Thanks for your help. I didn't think to use vectors or lists until just now. Guess I was thinking too hard.