if the content of the foo.txt file is a collection of ISO8859-1 characters:
BufferedReader br = new BufferedReader
(new InputStreamReader(new FileInputStream("foo.txt"), "ISO8859_1"));
Read them lines into an ArrayList. Then,
PrintWriter pw = new PrintWriter("foo.txt", "UTF8");
would overwrite the foo.txt with UTF-8 characters.