public ScriptWrapper loadScript ( ScriptWrapper script , Charset charset ) throws IOException { if ( script == null ) { throw new IllegalArgumentException ( "Parameter script must not be null." ) ; } if ( charset == null ) { throw new IllegalArgumentException ( "Parameter charset must not be null." ) ; } script . loadScript ( charset ) ; if ( script . getType ( ) == null ) { // This happens when scripts are loaded from the configs as the types // may well not have been registered at that stage script . setType ( this . getScriptType ( script . getTypeName ( ) ) ) ; } return script ; }
Loads the script from the file using the given charset .