Possible Duplicate:
How to create a Java String from the contents of a file
Hi I would like to read a text file and make the message a string.
String message = StringUtils.decode(FileUtils.readFileContent(templateResource.getFile(), templateResource.getCharset(), (int) templateResource.getLength()), notification.getParams());
i'm not very good with java, how can i convert this so it would work? the patch of the file i'm trying to read is: sms-notification/info-response.1.txt
I don't want to use the decode feature perhaps as the contents of the text file are just static.
would i do something like:
String message = StringUtils.decode(FileUtils.readFileContent("sms-notification/info-response.1.txt".getFile(), templateResource.getCharset(), (int) templateResource.getLength()), notification.getParams()); ?
because that is not working.