Campbell Ritchie wrote: . . . and welcome to the Ranch
Ulf Dittmer wrote:You'll need to use several classes from the java.io package for this. FileReader, BufferedReader, FileWriter and BufferedWriter might all be involved.
Note that FileReader and FileWriter use the platform default encoding, so make sure that's what the text files use. If they use some other encoding, then you'd have to use FileInputStream and InputStreamReader instead of FileReader, and the corresponding classes for writing the file. Those allow you to specify the encoding explicitly.
"If the facts don't fit the theory, get new facts" --Albert Einstein
"If the facts don't fit the theory, get new facts" --Albert Einstein
"If the facts don't fit the theory, get new facts" --Albert Einstein
I love this place!
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|