Class ScriptUtilities


  • public class ScriptUtilities
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String COPYRIGHT  
    • Constructor Summary

      Constructors 
      Constructor Description
      ScriptUtilities()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void includeScript​(ScriptEngine se, java.lang.String files)  
      static java.lang.String loadFile​(java.lang.String path)
      Reads the contents of a text file.
      • Methods inherited from class java.lang.Object

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

      • ScriptUtilities

        public ScriptUtilities()
    • Method Detail

      • includeScript

        public static void includeScript​(ScriptEngine se,
                                         java.lang.String files)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadFile

        public static java.lang.String loadFile​(java.lang.String path)
                                         throws java.lang.Exception
        Reads the contents of a text file.
        Parameters:
        path - the URL of the file
        Returns:
        the contents of the file
        Throws:
        java.lang.Exception - problem while reading the file