There's no single method that will read the entire file in java.io package, but you can quite easily do it by using a BufferedReader, reading line by line and appending them together with '\n' to get the full content. eg:
String line = null; StringBuilder sb = new StringBuilder(""); BufferedReader br = new BufferedReader("c:/path/yourfile.txt"); while ((thisLineline = br.readLine()) != null) { sb.append(line).append("\n"); } // you may probably need to remove the last '\n' before toString() String fileContent = sb.toString();