Automated decryption (substitution cipher)

I am attempting to write a Java application to decipher a fairly large piece of cipher text encrypted using a substitution cipher.

I have succesfully coded a class to process the cipher text (held in a .txt file) and store and output the frequency of each character. However, now I am wanting to replace the characters in the cipher text (and then check for correctness against a word list) I am unsure how to do this. Would it be better to make a copy of the cipher text file or replace within the original file? I am also unsure of the best general way of going about replacing the letters.

Any help greatly appreciated, my apologies if this sounds rather vague, if more information is required please let me know.

[735 byte] By [LeeBircha] at [2007-10-3 6:41:07]
# 1
Hi,Just create a new file and write the decrypted text to it.Kaj
kajbja at 2007-7-15 1:30:08 > top of Java-index,Java Essentials,Java Programming...
# 2
What would be the general process to write the replacement text to the new file?
LeeBircha at 2007-7-15 1:30:08 > top of Java-index,Java Essentials,Java Programming...
# 3
> What would be the general process to write the> replacement text to the new file?Just write the text using a FileWriter, probably in a loop.
kajbja at 2007-7-15 1:30:08 > top of Java-index,Java Essentials,Java Programming...
# 4

Well, I'd use a GUI interface. Display alternate lines of the cypher and plaintext in one area, and have a table of conjectured association. Changes to the association table would be immediately be reflected in the plaintext.

Creating a tenative file for each trial would be very tiresome.

malcolmmca at 2007-7-15 1:30:08 > top of Java-index,Java Essentials,Java Programming...