Possible Duplicate:
Whole text file to a String in Java
How can I read a text file to the very end?
Actually I need to output the whole file into the screen, therefore I think that I need to get the whole data in the file as an String.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use FileUtils‘s
readFileToString()method.