[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:
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) {
...
Thanks in advance!
Jason:confused: