[3056] in java-interest
No subject found in mail header
daemon@ATHENA.MIT.EDU (ser@jersey.uoregon.edu)
Fri Oct 27 20:48:12 1995
From: ser@jersey.uoregon.edu
To: bazzi@rennes.enst-bretagne.fr (Mohamed Bazzi)
Cc: java-interest@java.sun.com
In-Reply-To: bazzi@rennes.enst-bretagne.fr's message of Fri, 27 Oct 1995
10:31:49 +0100.
<9510270931.AA01588@sega>
Date: Fri, 27 Oct 1995 16:06:19 -0700
Hi, Mohamed,
Although I have never tried this, I suspect that you may have trouble writing
to files from an applet.
To read in a file given an URL,
URL msg = new URL(getParameter("pt));
DataInputStream fin = new DataInputStream(msg.getStream());
This will give you a stream you can read strings from.
If file output is allowed from java applets on the local host, this is how you
would do it:
String output = "Hello my baby\n";
DataOutputStream fout = new DataOutputStream(
new FileOutputStream("/usr/tmp/blah.txt"));
fout.writeBytes(output); // You can output Strings
fout.writeBytes("Hello my darling\n"); // in any form
fout.close();
--- SER
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com