亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? global.java

?? 主要的怎么樣結合java 和 javascript!
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
     * new function synchronizes on the <code>this</code> object of     * its invocation.     * js> var o = { f : sync(function(x) {     *       print("entry");     *       Packages.java.lang.Thread.sleep(x*1000);     *       print("exit");     *     })};     * js> spawn(function() {o.f(5);});     * Thread[Thread-0,5,main]     * entry     * js> spawn(function() {o.f(5);});     * Thread[Thread-1,5,main]     * js>     * exit     * entry     * exit     */    public static Object sync(Context cx, Scriptable thisObj, Object[] args,                              Function funObj)    {        if (args.length == 1 && args[0] instanceof Function) {            return new Synchronizer((Function)args[0]);        }        else {            throw reportRuntimeError("msg.sync.args");        }    }    /**     * Execute the specified command with the given argument and options     * as a separate process and return the exit status of the process.     * <p>     * Usage:     * <pre>     * runCommand(command)     * runCommand(command, arg1, ..., argN)     * runCommand(command, arg1, ..., argN, options)     * </pre>     * All except the last arguments to runCommand are converted to strings     * and denote command name and its arguments. If the last argument is a     * JavaScript object, it is an option object. Otherwise it is converted to     * string denoting the last argument and options objects assumed to be     * empty.     * Te following properties of the option object are processed:     * <ul>     * <li><tt>args</tt> - provides an array of additional command arguments     * <li><tt>env</tt> - explicit environment object. All its enumeratable     *   properties define the corresponding environment variable names.     * <li><tt>input</tt> - the process input. If it is not     *   java.io.InputStream, it is converted to string and sent to the process     *   as its input. If not specified, no input is provided to the process.     * <li><tt>output</tt> - the process output instead of     *   java.lang.System.out. If it is not instance of java.io.OutputStream,     *   the process output is read, converted to a string, appended to the     *   output property value converted to string and put as the new value of     *   the output property.     * <li><tt>err</tt> - the process error output instead of     *   java.lang.System.err. If it is not instance of java.io.OutputStream,     *   the process error output is read, converted to a string, appended to     *   the err property value converted to string and put as the new     *   value of the err property.     * </ul>     */    public static Object runCommand(Context cx, Scriptable thisObj,                                    Object[] args, Function funObj)        throws IOException    {        int L = args.length;        if (L == 0 || (L == 1 && args[0] instanceof Scriptable)) {            throw reportRuntimeError("msg.runCommand.bad.args");        }        InputStream in = null;        OutputStream out = null, err = null;        ByteArrayOutputStream outBytes = null, errBytes = null;        Object outObj = null, errObj = null;        String[] environment = null;        Scriptable params = null;        Object[] addArgs = null;        if (args[L - 1] instanceof Scriptable) {            params = (Scriptable)args[L - 1];            --L;            Object envObj = ScriptableObject.getProperty(params, "env");            if (envObj != Scriptable.NOT_FOUND) {                if (envObj == null) {                    environment = new String[0];                } else {                    if (!(envObj instanceof Scriptable)) {                        throw reportRuntimeError("msg.runCommand.bad.env");                    }                    Scriptable envHash = (Scriptable)envObj;                    Object[] ids = ScriptableObject.getPropertyIds(envHash);                    environment = new String[ids.length];                    for (int i = 0; i != ids.length; ++i) {                        Object keyObj = ids[i], val;                        String key;                        if (keyObj instanceof String) {                            key = (String)keyObj;                            val = ScriptableObject.getProperty(envHash, key);                        } else {                            int ikey = ((Number)keyObj).intValue();                            key = Integer.toString(ikey);                            val = ScriptableObject.getProperty(envHash, ikey);                        }                        if (val == ScriptableObject.NOT_FOUND) {                            val = Undefined.instance;                        }                        environment[i] = key+'='+ScriptRuntime.toString(val);                    }                }            }            Object inObj = ScriptableObject.getProperty(params, "input");            if (inObj != Scriptable.NOT_FOUND) {                in = toInputStream(inObj);            }            outObj = ScriptableObject.getProperty(params, "output");            if (outObj != Scriptable.NOT_FOUND) {                out = toOutputStream(outObj);                if (out == null) {                    outBytes = new ByteArrayOutputStream();                    out = outBytes;                }            }            errObj = ScriptableObject.getProperty(params, "err");            if (errObj != Scriptable.NOT_FOUND) {                err = toOutputStream(errObj);                if (err == null) {                    errBytes = new ByteArrayOutputStream();                    err = errBytes;                }            }            Object addArgsObj = ScriptableObject.getProperty(params, "args");            if (addArgsObj != Scriptable.NOT_FOUND) {                Scriptable s = Context.toObject(addArgsObj,                                                getTopLevelScope(thisObj));                addArgs = cx.getElements(s);            }        }        Global global = getInstance(funObj);        if (out == null) {            out = (global != null) ? global.getOut() : System.out;        }        if (err == null) {            err = (global != null) ? global.getErr() : System.err;        }        // If no explicit input stream, do not send any input to process,        // in particular, do not use System.in to avoid deadlocks        // when waiting for user input to send to process which is already        // terminated as it is not always possible to interrupt read method.        String[] cmd = new String[(addArgs == null) ? L : L + addArgs.length];        for (int i = 0; i != L; ++i) {            cmd[i] = ScriptRuntime.toString(args[i]);        }        if (addArgs != null) {            for (int i = 0; i != addArgs.length; ++i) {                cmd[L + i] = ScriptRuntime.toString(addArgs[i]);            }        }        int exitCode = runProcess(cmd, environment, in, out, err);        if (outBytes != null) {            String s = ScriptRuntime.toString(outObj) + outBytes.toString();            ScriptableObject.putProperty(params, "output", s);        }        if (errBytes != null) {            String s = ScriptRuntime.toString(errObj) + errBytes.toString();            ScriptableObject.putProperty(params, "err", s);        }        return new Integer(exitCode);    }    /**     * The seal function seals all supplied arguments.     */    public static void seal(Context cx, Scriptable thisObj, Object[] args,                            Function funObj)    {        for (int i = 0; i != args.length; ++i) {            Object arg = args[i];            if (!(arg instanceof ScriptableObject) || arg == Undefined.instance)            {                if (!(arg instanceof Scriptable) || arg == Undefined.instance)                {                    throw reportRuntimeError("msg.shell.seal.not.object");                } else {                    throw reportRuntimeError("msg.shell.seal.not.scriptable");                }            }        }        for (int i = 0; i != args.length; ++i) {            Object arg = args[i];            ((ScriptableObject)arg).sealObject();        }    }    /**     * The readFile reads the given file context and convert it to a string     * using the specified character coding or default character coding if     * explicit coding argument is not given.     * <p>     * Usage:     * <pre>     * readFile(filePath)     * readFile(filePath, charCoding)     * </pre>     * The first form converts file's context to string using the default     * character coding.     */    public static Object readFile(Context cx, Scriptable thisObj, Object[] args,                                  Function funObj)        throws IOException    {        if (args.length == 0) {            throw reportRuntimeError("msg.shell.readFile.bad.args");        }        String path = ScriptRuntime.toString(args[0]);        String charCoding = null;        if (args.length >= 2) {            charCoding = ScriptRuntime.toString(args[1]);        }        return readUrl(path, charCoding, true);    }    /**     * The readUrl opens connection to the given URL, read all its data     * and converts them to a string     * using the specified character coding or default character coding if     * explicit coding argument is not given.     * <p>     * Usage:     * <pre>     * readUrl(url)     * readUrl(url, charCoding)     * </pre>     * The first form converts file's context to string using the default     * charCoding.     */    public static Object readUrl(Context cx, Scriptable thisObj, Object[] args,                                 Function funObj)        throws IOException    {        if (args.length == 0) {            throw reportRuntimeError("msg.shell.readUrl.bad.args");        }        String url = ScriptRuntime.toString(args[0]);        String charCoding = null;        if (args.length >= 2) {            charCoding = ScriptRuntime.toString(args[1]);        }        return readUrl(url, charCoding, false);    }    public InputStream getIn() {        return inStream == null ? System.in : inStream;    }    public void setIn(InputStream in) {        inStream = in;    }    public PrintStream getOut() {        return outStream == null ? System.out : outStream;    }    public void setOut(PrintStream out) {        outStream = out;    }    public PrintStream getErr() {        return errStream == null ? System.err : errStream;    }    public void setErr(PrintStream err) {        errStream = err;    }    public void setSealedStdLib(boolean value)    {        sealedStdLib = value;    }    private static Global getInstance(Function function)    {        Scriptable scope = function.getParentScope();        if (!(scope instanceof Global))            throw reportRuntimeError("msg.bad.shell.function.scope",                                     String.valueOf(scope));        return (Global)scope;    }    /**     * If any of in, out, err is null, the corresponding process stream will     * be closed immediately, otherwise it will be closed as soon as     * all data will be read from/written to process     */    private static int runProcess(String[] cmd, String[] environment,                                  InputStream in, OutputStream out,                                  OutputStream err)        throws IOException    {        Process p;        if (environment == null) {            p = Runtime.getRuntime().exec(cmd);        } else {            p = Runtime.getRuntime().exec(cmd, environment);        }        PipeThread inThread = null, errThread = null;        try {            InputStream errProcess = null;            try {                if (err != null) {                    errProcess = p.getErrorStream();                } else {                    p.getErrorStream().close();                }                InputStream outProcess = null;                try {                    if (out != null) {                        outProcess = p.getInputStream();                    } else {                        p.getInputStream().close();                    }                    OutputStream inProcess = null;                    try {                        if (in != null) {                            inProcess = p.getOutputStream();                        } else {                            p.getOutputStream().close();                        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久蜜桃| 成人福利电影精品一区二区在线观看| 欧美在线色视频| 亚洲女同女同女同女同女同69| 99久久国产综合精品女不卡| 亚洲婷婷综合色高清在线| 99re亚洲国产精品| 亚洲在线免费播放| 欧美日韩在线观看一区二区| 亚洲电影第三页| 日韩三级中文字幕| 久久99久久久久久久久久久| 欧美一区二区三区在线电影| 久久爱www久久做| 久久久精品tv| 欧美三级中文字| 免费人成在线不卡| 国产精品女同一区二区三区| 91麻豆精品在线观看| 日一区二区三区| 国产婷婷色一区二区三区四区| 成人av在线资源| 日韩**一区毛片| 亚洲欧美自拍偷拍色图| 欧美二区三区91| 国产99久久久久久免费看农村| 亚洲乱码中文字幕综合| 日韩欧美在线123| 91丨国产丨九色丨pron| 六月婷婷色综合| 亚洲国产精品一区二区尤物区| 久久久久久久久99精品| 欧美高清www午色夜在线视频| 国产a久久麻豆| 久久99精品久久久| 亚洲狠狠爱一区二区三区| 欧美国产一区视频在线观看| 欧美一区二区三区系列电影| 色哟哟精品一区| 国产sm精品调教视频网站| 日本成人中文字幕在线视频| 亚洲精品高清视频在线观看| 亚洲国产成人私人影院tom| 精品国产一区二区国模嫣然| 91麻豆精品国产91久久久久久久久| jlzzjlzz亚洲女人18| 99麻豆久久久国产精品免费 | 美日韩一区二区| 夜夜嗨av一区二区三区| 亚洲色图在线看| 亚洲色图都市小说| 亚洲成人三级小说| 午夜不卡av在线| 亚洲成人av中文| 美女视频免费一区| 天天免费综合色| 精品亚洲欧美一区| 成人看片黄a免费看在线| yourporn久久国产精品| 亚洲一区视频在线| 国产1区2区3区精品美女| 国产一区二区三区免费播放| 在线观看国产精品网站| 欧美国产日本韩| 亚洲福利一二三区| 男人的天堂久久精品| 激情综合色综合久久综合| 韩国一区二区三区| 91麻豆成人久久精品二区三区| 成人午夜视频在线观看| 99视频超级精品| 欧美日韩一级大片网址| 日韩一区二区视频| 国产精品久久看| 天堂久久久久va久久久久| 美女视频黄频大全不卡视频在线播放 | eeuss鲁片一区二区三区在线看| 欧美美女直播网站| 亚洲免费资源在线播放| 国产精品亚洲午夜一区二区三区 | 国产呦精品一区二区三区网站| 国产ts人妖一区二区| 精品裸体舞一区二区三区| 亚洲天堂免费看| 成人av网在线| 国产精品久久99| 波多野结衣中文一区| 国产精品国产三级国产aⅴ中文 | 欧美日韩国产首页| 日韩精品中午字幕| 国产v日产∨综合v精品视频| 一区二区三区四区视频精品免费 | 欧美亚一区二区| 亚洲国产视频在线| 欧美三级日韩三级| 亚洲精品一二三| 色综合一区二区三区| 亚洲午夜免费视频| 欧美亚洲图片小说| 亚洲国产精品欧美一二99| 在线播放亚洲一区| 久久精品噜噜噜成人av农村| 亚洲综合激情另类小说区| 成人精品视频一区二区三区尤物| 国产精品国产三级国产aⅴ原创| 久久99精品久久久久久| 欧美高清在线视频| 日本韩国欧美在线| 男女男精品视频| 亚洲欧美自拍偷拍| 欧美一区二区三区视频| 国产精品香蕉一区二区三区| 亚洲视频在线观看一区| 在线观看www91| 久久国产尿小便嘘嘘| 国产欧美一区二区三区网站| 一本一道综合狠狠老| 日韩成人精品在线观看| 久久久久国产免费免费| 在线视频综合导航| 国产69精品久久久久777| 日韩专区欧美专区| 亚洲人精品午夜| 国产精品灌醉下药二区| 精品国产免费人成在线观看| 欧美日韩五月天| 91热门视频在线观看| 99久久99久久精品免费看蜜桃| 国产精品亚洲专一区二区三区| 久久99久久精品欧美| 毛片av一区二区| 韩国视频一区二区| 日本vs亚洲vs韩国一区三区 | 成人午夜激情影院| 麻豆成人久久精品二区三区红 | 蜜臀a∨国产成人精品| 夜夜揉揉日日人人青青一国产精品| 久久久国产午夜精品| 日韩无一区二区| 日韩一区二区三区在线观看| 欧美一区二区免费观在线| 欧洲一区在线观看| 日本色综合中文字幕| 老司机一区二区| 国产精品原创巨作av| 国产寡妇亲子伦一区二区| 蜜桃精品在线观看| 麻豆精品在线观看| 成人精品电影在线观看| 成年人国产精品| 欧美天天综合网| 欧美一区二区观看视频| 欧美电影免费提供在线观看| 精品日韩在线一区| 久久伊99综合婷婷久久伊| 亚洲国产乱码最新视频 | 日本成人在线电影网| 国产美女在线精品| 色噜噜狠狠成人网p站| 欧美精品免费视频| 国产亚洲人成网站| 亚洲午夜影视影院在线观看| 青青草伊人久久| 成人精品视频一区二区三区尤物| 欧美性生活影院| 亚洲欧洲精品天堂一级| 性做久久久久久免费观看欧美| 国产精品一区二区x88av| 欧美亚洲图片小说| 国产欧美日韩亚州综合| 水野朝阳av一区二区三区| 国产成人综合亚洲91猫咪| 欧美日本高清视频在线观看| 久久精品亚洲精品国产欧美kt∨| 亚洲国产欧美在线人成| 国产福利91精品一区二区三区| 在线播放亚洲一区| 亚洲愉拍自拍另类高清精品| 国产精品66部| 久久免费的精品国产v∧| 水蜜桃久久夜色精品一区的特点| 成人黄色综合网站| 欧美激情在线免费观看| 狠狠久久亚洲欧美| 亚洲精品在线三区| 激情综合网av| 久久久久久99精品| 国产一区二区视频在线| 亚洲精品一区二区精华| 美国三级日本三级久久99| 91精品久久久久久蜜臀| 图片区小说区区亚洲影院| 在线免费一区三区| 亚洲一区二区高清| 欧美视频精品在线| 午夜免费久久看| 日韩一区二区在线免费观看| 男女激情视频一区| 久久久久久久网| 99re66热这里只有精品3直播 |