Class ResourceUtils


  • public class ResourceUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String toString​(java.lang.String resourcePath)
      Convert a resource file on the classpath into a String
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toString

        public static java.lang.String toString​(java.lang.String resourcePath)
                                         throws java.io.IOException
        Convert a resource file on the classpath into a String
        Parameters:
        resourcePath - an absolute path to the resource. NOTE: Do not include a leading slash
        Returns:
        resource file contents as a String
        Throws:
        java.io.IOException - if the file cannot be found or read.