title: reading a text file in java and making it a string
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/326390/how-to-create-a-java-string-from-the-contents-of-a-file">How to create a Java String from the contents of a file</a>  </p>
  </blockquote>
  
  
  
  <p>Hi I would like to read a text file and make the message a string.</p>
  
  <pre><code>String message = StringUtils.decode(FileUtils.readFileContent(templateResource.getFile(), templateResource.getCharset(), (int) templateResource.getLength()), notification.getParams());
  </code></pre>
  
  <p>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</p>
  
  <p>I don't want to use the decode feature perhaps as the contents of the text file are just static.</p>
  
  <p>would i do something like:</p>
  
  <pre><code>String message = StringUtils.decode(FileUtils.readFileContent("sms-notification/info-response.1.txt".getFile(), templateResource.getCharset(), (int) templateResource.getLength()), notification.getParams()); ?
  </code></pre>
  
  <p>because that is not working.</p>