If you are using Java 5/6, you can use Apache Commons IO for read file to string. The class org.apache.commons.io.FileUtils
contais several method for read files.
e.g. using the method FileUtils#readFileToString
:
File file = new File("abc.txt");
String content = FileUtils.readFileToString(file);