![]() |
The Java Developers Almanac 1.4 |
|
e37. Writing to a FileIf the file does not already exist, it is automatically created. try {
BufferedWriter out = new BufferedWriter(new FileWriter("outfilename"));
out.write("aString");
out.close();
} catch (IOException e) {
}
e35. Reading Text from a File e36. Reading a File into a Byte Array e38. Appending to a File e39. Using a Random Access File
© 2002 Addison-Wesley. |