to get the content of a txt file I usually use a scanner and iterate over each line to get the content:
Scanner sc = new Scanner(new File("file.txt"));
String str = sc.nextLine();
String content = FileUtils.readFileToString(new File("file.txt"))
With Java 7 there is an API along those lines.