decoder-js/src/main/java/com/hpe/caf/decoder/JavascriptDecoder.java
private static Object evaluateScript(final ScriptEngine scriptEngine, final InputStream stream) throws IOException, ScriptException
    {
        try (final InputStreamReader reader = new InputStreamReader(stream, StandardCharsets.UTF_8)) {
            return scriptEngine.eval(reader);
        }
    }
private static Object evaluateScript(final ScriptEngine scriptEngine, final InputStream stream) throws IOException, ScriptException
    {
        try (final InputStreamReader reader = new InputStreamReader(stream, StandardCharsets.UTF_8)) {
            return scriptEngine.eval(reader);
        }
    }
private static Object evaluateScript ( final ScriptEngine scriptEngine , final InputStream stream ) throws IOException , ScriptException { try ( final InputStreamReader reader = new InputStreamReader ( stream , StandardCharsets . UTF_8 ) ) { return scriptEngine . eval ( reader ) ; } }
Executes the specified script. The source of the script is supplied as a UTF-8 encoded {@code InputStream}. The default
{@code ScriptContext} for the {@code ScriptEngine} is used.

@param scriptEngine the scripting engine
@param stream the source of the script, encoded in UTF-8
@return the value returned by the script
@throws IOException if the {@code InputStream} cannot be read
@throws ScriptException if an error occurs in the script
Executes the specified script . The source of the script is supplied as a UTF - 8 encoded { @code InputStream } . The default { @code ScriptContext } for the { @code ScriptEngine } is used .