[Solved] DataInputStream to file

It's a rarity that I work in Java, so excuse the ignorance please. I've downloaded the StarPound suite of products (CEBPM tools) and am trying to write a file-conversion utility. I'm having trouble saving a URL to a file, as I don't know how. Here's the code:

Java Code:

try {
u = new URL( "http://test.wav" );
is = u.openStream();
dis = new DataInputStream(new BufferedInputStream(is));
while ((s = dis.readLine()) != null) {
//System.out.println(s);
// [COLOR="Red"]Instead of using System.out.println....I'd like to create a local file out of what I downloaded from the server.[/COLOR]
}
} catch (MalformedURLException mue) {
...

Probably the simplest thing to do is to wrap a PrintWriter around a BufferedWriter, wrapped around a FileWriter. Your PrintWriter will have the same methods that System.out (which is a PrintStream) has, so you can easily adapt whatever sample code you are looking at.