Info Call to Socket API

Description

List of all calls to Server Socket API.

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method kawa.repl.processArgs() calling method java.net.ServerSocket.<init>()


    public static int processArgs(String[] p45, int p46, int p47)
    {
        int v39 = 0;
        while (p46 < p47) {
            String v14_0 = p45[p46];
            if ((!v14_0.equals("-c")) && (!v14_0.equals("-e"))) {
                if (!v14_0.equals("-f")) {
                    if (!v14_0.startsWith("--script")) {
                        if (!v14_0.equals("\\")) {
                            if ((!v14_0.equals("-s")) && (!v14_0.equals("--"))) {
                                if (!v14_0.equals("-w")) {
                                    if (!v14_0.equals("-d")) {
                                        if ((!v14_0.equals("--target")) && (!v14_0.equals("target"))) {
                                            if (!v14_0.equals("-P")) {
                                                if (!v14_0.equals("-T")) {
                                                    if (!v14_0.equals("-C")) {
                                                        if ((!v14_0.equals("--output-format")) && (!v14_0.equals("--format"))) {
                                                            if (!v14_0.equals("--connect")) {
                                                                if (!v14_0.equals("--server")) {
                                                                    if (!v14_0.equals("--http-auto-handler")) {
                                                                        if (!v14_0.equals("--http-start")) {
                                                                            if (!v14_0.equals("--main")) {
                                                                                if (!v14_0.equals("--applet")) {
                                                                                    if (!v14_0.equals("--servlet")) {
                                                                                        if (!v14_0.equals("--debug-dump-zip")) {
                                                                                            if (!v14_0.equals("--debug-print-expr")) {
                                                                                                if (!v14_0.equals("--debug-print-final-expr")) {
                                                                                                    if (!v14_0.equals("--debug-error-prints-stack-trace")) {
                                                                                                        if (!v14_0.equals("--debug-warning-prints-stack-trace")) {
                                                                                                            if ((!v14_0.equals("--module-nonstatic")) && (!v14_0.equals("--no-module-static"))) {
                                                                                                                if (!v14_0.equals("--module-static")) {
                                                                                                                    if (!v14_0.equals("--module-static-run")) {
                                                                                                                        if ((!v14_0.equals("--no-inline")) && (!v14_0.equals("--inline=none"))) {
                                                                                                                            if (!v14_0.equals("--no-console")) {
                                                                                                                                if (!v14_0.equals("--inline")) {
                                                                                                                                    if (!v14_0.equals("--cps")) {
                                                                                                                                        if (!v14_0.equals("--full-tailcalls")) {
                                                                                                                                            if (!v14_0.equals("--no-full-tailcalls")) {
                                                                                                                                                if (!v14_0.equals("--pedantic")) {
                                                                                                                                                    if (!v14_0.equals("--help")) {
                                                                                                                                                        if (!v14_0.equals("--author")) {
                                                                                                                                                            if (!v14_0.equals("--version")) {
                                                                                                                                                                if ((v14_0.length() <= 0) || (v14_0.charAt(0) != 45)) {
                                                                                                                                                                    if (!gnu.expr.ApplicationMainSupport.processSetProperty(v14_0)) {
                                                                                                                                                                        break;
                                                                                                                                                                    }
                                                                                                                                                                } else {
                                                                                                                                                                    String v28 = v14_0;
                                                                                                                                                                    if ((v28.length() > 2) && (v28.charAt(0) == 45)) {
                                                                                                                                                                        int v3_53;
                                                                                                                                                                        if (v28.charAt(1) != 45) {
                                                                                                                                                                            v3_53 = 1;
                                                                                                                                                                        } else {
                                                                                                                                                                            v3_53 = 2;
                                                                                                                                                                        }
                                                                                                                                                                        v28 = v28.substring(v3_53);
                                                                                                                                                                    }
                                                                                                                                                                    gnu.expr.Language v25 = gnu.expr.Language.getInstance(v28);
                                                                                                                                                                    if (v25 == null) {
                                                                                                                                                                        String v30;
                                                                                                                                                                        int v19 = v28.indexOf("=");
                                                                                                                                                                        if (v19 >= 0) {
                                                                                                                                                                            v30 = v28.substring((v19 + 1));
                                                                                                                                                                            v28 = v28.substring(0, v19);
                                                                                                                                                                        } else {
                                                                                                                                                                            v30 = 0;
                                                                                                                                                                        }
                                                                                                                                                                        if ((!v28.startsWith("no-")) || (v28.length() <= 3)) {
                                                                                                                                                                            int v42 = 0;
                                                                                                                                                                        } else {
                                                                                                                                                                            v42 = 1;
                                                                                                                                                                        }
                                                                                                                                                                        if ((v30 == null) && (v42 != 0)) {
                                                                                                                                                                            v30 = "no";
                                                                                                                                                                            v28 = v28.substring(3);
                                                                                                                                                                        }
                                                                                                                                                                        String v27 = gnu.expr.Compilation.options.set(v28, v30);
                                                                                                                                                                        if (v27 != null) {
                                                                                                                                                                            if ((v42 != 0) && (v27 == "unknown option name")) {
                                                                                                                                                                                v27 = new StringBuilder().append("both \'--no-\' prefix and \'=").append(v30).append("\' specified").toString();
                                                                                                                                                                            }
                                                                                                                                                                            if (v27 != "unknown option name") {
                                                                                                                                                                                System.err.println(new StringBuilder().append("kawa: bad option \'").append(v14_0).append("\': ").append(v27).toString());
                                                                                                                                                                                System.exit(-1);
                                                                                                                                                                            } else {
                                                                                                                                                                                kawa.repl.bad_option(v14_0);
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    } else {
                                                                                                                                                                        if (kawa.repl.previousLanguage != null) {
                                                                                                                                                                            gnu.expr.Language.setCurrentLanguage(v25);
                                                                                                                                                                        } else {
                                                                                                                                                                            gnu.expr.Language.setDefaults(v25);
                                                                                                                                                                        }
                                                                                                                                                                        kawa.repl.previousLanguage = v25;
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            } else {
                                                                                                                                                                System.out.print("Kawa ");
                                                                                                                                                                System.out.print(kawa.Version.getVersion());
                                                                                                                                                                System.out.println();
                                                                                                                                                                System.out.println("Copyright (C) 2009 Per Bothner");
                                                                                                                                                                v39 = 1;
                                                                                                                                                            }
                                                                                                                                                        } else {
                                                                                                                                                            System.out.println("Per Bothner <per@bothner.com>");
                                                                                                                                                            System.exit(0);
                                                                                                                                                        }
                                                                                                                                                    } else {
                                                                                                                                                        kawa.repl.printOptions(System.out);
                                                                                                                                                        System.exit(0);
                                                                                                                                                    }
                                                                                                                                                } else {
                                                                                                                                                    gnu.expr.Language.requirePedantic = 1;
                                                                                                                                                }
                                                                                                                                            } else {
                                                                                                                                                gnu.expr.Compilation.defaultCallConvention = 1;
                                                                                                                                            }
                                                                                                                                        } else {
                                                                                                                                            gnu.expr.Compilation.defaultCallConvention = 3;
                                                                                                                                        }
                                                                                                                                    } else {
                                                                                                                                        gnu.expr.Compilation.defaultCallConvention = 4;
                                                                                                                                    }
                                                                                                                                } else {
                                                                                                                                    gnu.expr.Compilation.inlineOk = 1;
                                                                                                                                }
                                                                                                                            } else {
                                                                                                                                kawa.repl.noConsole = 1;
                                                                                                                            }
                                                                                                                        } else {
                                                                                                                            gnu.expr.Compilation.inlineOk = 0;
                                                                                                                        }
                                                                                                                    } else {
                                                                                                                        gnu.expr.Compilation.moduleStatic = 2;
                                                                                                                    }
                                                                                                                } else {
                                                                                                                    gnu.expr.Compilation.moduleStatic = 1;
                                                                                                                }
                                                                                                            } else {
                                                                                                                gnu.expr.Compilation.moduleStatic = -1;
                                                                                                            }
                                                                                                        } else {
                                                                                                            gnu.text.SourceMessages.debugStackTraceOnWarning = 1;
                                                                                                        }
                                                                                                    } else {
                                                                                                        gnu.text.SourceMessages.debugStackTraceOnError = 1;
                                                                                                    }
                                                                                                } else {
                                                                                                    gnu.expr.Compilation.debugPrintFinalExpr = 1;
                                                                                                }
                                                                                            } else {
                                                                                                gnu.expr.Compilation.debugPrintExpr = 1;
                                                                                            }
                                                                                        } else {
                                                                                            gnu.expr.ModuleExp.dumpZipPrefix = "kawa-zip-dump-";
                                                                                        }
                                                                                    } else {
                                                                                        kawa.repl.defaultParseOptions = (kawa.repl.defaultParseOptions | 32);
                                                                                        gnu.kawa.servlet.HttpRequestContext.importServletDefinitions = 2;
                                                                                    }
                                                                                } else {
                                                                                    kawa.repl.defaultParseOptions = (kawa.repl.defaultParseOptions | 16);
                                                                                }
                                                                            } else {
                                                                                gnu.expr.Compilation.generateMainDefault = 1;
                                                                            }
                                                                        } else {
                                                                            p46++;
                                                                            if (p46 >= p47) {
                                                                                kawa.repl.bad_option("missing httpd port argument");
                                                                            }
                                                                            System.err.println("kawa: HttpServer classes not found");
                                                                            System.exit(-1);
                                                                        }
                                                                    } else {
                                                                        p46 += 2;
                                                                        if (p46 >= p47) {
                                                                            kawa.repl.bad_option(v14_0);
                                                                        }
                                                                        System.err.println("kawa: HttpServer classes not found");
                                                                        System.exit(-1);
                                                                    }
                                                                } else {
                                                                    kawa.repl.getLanguage();
                                                                    int v46_1 = (p46 + 1);
                                                                    if (v46_1 == p47) {
                                                                        kawa.repl.bad_option(v14_0);
                                                                    }
                                                                    int v31_0;
                                                                    if (!p45[v46_1].equals("-")) {
                                                                        try {
                                                                            v31_0 = Integer.parseInt(p45[v46_1]);
                                                                        } catch (java.io.IOException v21) {
                                                                            kawa.repl.bad_option("--server port#");
                                                                            v31_0 = -1;
                                                                        }
                                                                        java.net.ServerSocket v41 = new java.net.ServerSocket;
                                                                        v41(v31_0);
                                                                        System.err.println(new StringBuilder().append("Listening on port ").append(v41.getLocalPort()).toString());
                                                                        while(true) {
                                                                            System.err.print("waiting ... ");
                                                                            System.err.flush();
                                                                            java.net.Socket v16 = v41.accept();
                                                                            System.err.println(new StringBuilder().append("got connection from ").append(v16.getInetAddress()).append(" port:").append(v16.getPort()).toString());
                                                                            kawa.TelnetRepl.serve(gnu.expr.Language.getDefaultLanguage(), v16);
                                                                        }
                                                                    } else {
                                                                        v31_0 = 0;
                                                                    }
                                                                    try {
                                                                    } catch (java.io.IOException v21_0) {
                                                                        throw new Error(v21_0.toString());
                                                                    }
                                                                }
                                                            } else {
                                                                p46++;
                                                                if (p46 == p47) {
                                                                    kawa.repl.bad_option(v14_0);
                                                                }
                                                                int v31_2;
                                                                if (!p45[p46].equals("-")) {
                                                                    try {
                                                                        v31_2 = Integer.parseInt(p45[p46]);
                                                                    } catch (java.io.IOException v21) {
                                                                        kawa.repl.bad_option("--connect port#");
                                                                        v31_2 = -1;
                                                                    }
                                                                    java.net.Socket v38 = new java.net.Socket;
                                                                    v38(java.net.InetAddress.getByName(0), v31_2);
                                                                    kawa.Telnet v17 = new kawa.Telnet;
                                                                    v17(v38, 1);
                                                                    kawa.TelnetInputStream v36 = v17.getInputStream();
                                                                    java.io.PrintStream v32 = new java.io.PrintStream;
                                                                    v32(v17.getOutputStream(), 1);
                                                                    System.setIn(v36);
                                                                    System.setOut(v32);
                                                                    System.setErr(v32);
                                                                    p46++;
                                                                } else {
                                                                    v31_2 = 0;
                                                                }
                                                                try {
                                                                } catch (java.io.IOException v21_1) {
                                                                    v21_1.printStackTrace(System.err);
                                                                    throw new Error(v21_1.toString());
                                                                }
                                                            }
                                                        } else {
                                                            p46++;
                                                            if (p46 == p47) {
                                                                kawa.repl.bad_option(v14_0);
                                                            }
                                                            kawa.Shell.setDefaultFormat(p45[p46]);
                                                        }
                                                    } else {
                                                        int v46_2 = (p46 + 1);
                                                        if (v46_2 == p47) {
                                                            kawa.repl.bad_option(v14_0);
                                                        }
                                                        kawa.repl.compileFiles(p45, v46_2, p47);
                                                        int v3_46 = -1;
                                                        return v3_46;
                                                    }
                                                } else {
                                                    p46++;
                                                    if (p46 == p47) {
                                                        kawa.repl.bad_option(v14_0);
                                                    }
                                                    kawa.repl.compilationTopname = p45[p46];
                                                }
                                            } else {
                                                p46++;
                                                if (p46 == p47) {
                                                    kawa.repl.bad_option(v14_0);
                                                }
                                                gnu.expr.Compilation.classPrefixDefault = p45[p46];
                                            }
                                        } else {
                                            p46++;
                                            if (p46 == p47) {
                                                kawa.repl.bad_option(v14_0);
                                            }
                                            String v14_1 = p45[p46];
                                            if (v14_1.equals("7")) {
                                                gnu.expr.Compilation.defaultClassFileVersion = 3342336;
                                            }
                                            if ((!v14_1.equals("6")) && (!v14_1.equals("1.6"))) {
                                                if ((!v14_1.equals("5")) && (!v14_1.equals("1.5"))) {
                                                    if (!v14_1.equals("1.4")) {
                                                        if (!v14_1.equals("1.3")) {
                                                            if (!v14_1.equals("1.2")) {
                                                                if (!v14_1.equals("1.1")) {
                                                                    kawa.repl.bad_option(v14_1);
                                                                } else {
                                                                    gnu.expr.Compilation.defaultClassFileVersion = 2949123;
                                                                }
                                                            } else {
                                                                gnu.expr.Compilation.defaultClassFileVersion = 3014656;
                                                            }
                                                        } else {
                                                            gnu.expr.Compilation.defaultClassFileVersion = 3080192;
                                                        }
                                                    } else {
                                                        gnu.expr.Compilation.defaultClassFileVersion = 3145728;
                                                    }
                                                } else {
                                                    gnu.expr.Compilation.defaultClassFileVersion = 3211264;
                                                }
                                            } else {
                                                gnu.expr.Compilation.defaultClassFileVersion = 3276800;
                                            }
                                        }
                                    } else {
                                        p46++;
                                        if (p46 == p47) {
                                            kawa.repl.bad_option(v14_0);
                                        }
                                        gnu.expr.ModuleManager.getInstance().setCompilationDirectory(p45[p46]);
                                    }
                                } else {
                                    p46++;
                                    kawa.repl.getLanguage();
                                    kawa.repl.setArgs(p45, p46);
                                    kawa.repl.checkInitFile();
                                    kawa.repl.startGuiConsole();
                                    v39 = 1;
                                }
                            } else {
                                int v46_3 = (p46 + 1);
                                kawa.repl.getLanguage();
                                kawa.repl.setArgs(p45, v46_3);
                                kawa.repl.checkInitFile();
                                kawa.Shell.run(gnu.expr.Language.getDefaultLanguage(), gnu.mapping.Environment.getCurrent());
                                v3_46 = -1;
                                return v3_46;
                            }
                        } else {
                            int v46_4 = (p46 + 1);
                            if (v46_4 == p47) {
                                kawa.repl.bad_option(v14_0);
                            }
                            String v22_0 = p45[v46_4];
                            gnu.text.SourceMessages v7_1 = new gnu.text.SourceMessages();
                            try {
                                java.io.BufferedInputStream v23 = new java.io.BufferedInputStream;
                                v23(new java.io.FileInputStream(v22_0));
                                int v15_0 = v23.read();
                            } catch (java.io.IOException v21_3) {
                                kawa.Shell.printError(v21_3, v7_1, gnu.mapping.OutPort.errDefault());
                                System.exit(1);
                                v3_46 = -1;
                                return v3_46;
                            }
                            if (v15_0 == 35) {
                                StringBuffer v34 = new StringBuffer;
                                v34(100);
                                java.util.Vector v44 = new java.util.Vector;
                                v44(10);
                                int v43 = 0;
                                while ((v15_0 != 10) && ((v15_0 != 13) && (v15_0 >= 0))) {
                                    v15_0 = v23.read();
                                }
                                while(true) {
                                    int v15_1 = v23.read();
                                    if (v15_1 < 0) {
                                        System.err.println(new StringBuilder().append("unexpected end-of-file processing argument line for: \'").append(v22_0).append(39).toString());
                                        System.exit(-1);
                                    }
                                    if (v43 != 0) {
                                        if (v43 != 92) {
                                            if (v15_1 == v43) {
                                                v43 = 0;
                                            }
                                        } else {
                                            v43 = 0;
                                        }
                                    } else {
                                        if ((v15_1 != 92) && ((v15_1 != 39) && (v15_1 != 34))) {
                                            if ((v15_1 == 10) || (v15_1 == 13)) {
                                                break;
                                            }
                                            if ((v15_1 == 32) || (v15_1 == 9)) {
                                                if (v34.length() > 0) {
                                                    v44.addElement(v34.toString());
                                                    v34.setLength(0);
                                                }
                                            }
                                        } else {
                                            v43 = v15_1;
                                        }
                                    }
                                    v34.append(((char) v15_1));
                                }
                                if (v34.length() > 0) {
                                    v44.addElement(v34.toString());
                                }
                                int v29 = v44.size();
                                if (v29 <= 0) {
                                    kawa.repl.getLanguageFromFilenameExtension(v22_0);
                                    gnu.mapping.InPort v10 = gnu.mapping.InPort.openFile(v23, v22_0);
                                    kawa.repl.setArgs(p45, (v46_4 + 1));
                                    kawa.repl.checkInitFile();
                                    gnu.mapping.OutPort v20 = gnu.mapping.OutPort.errDefault();
                                    java.io.IOException v21_2 = kawa.Shell.run(gnu.expr.Language.getDefaultLanguage(), gnu.mapping.Environment.getCurrent(), v10, gnu.mapping.OutPort.outDefault(), 0, v7_1);
                                    v7_1.printAll(v20, 20);
                                    if (v21_2 == null) {
                                    } else {
                                        if (((v21_2 instanceof gnu.text.SyntaxException)) && (((gnu.text.SyntaxException) v21_2).getMessages() == v7_1)) {
                                            System.exit(1);
                                        }
                                        throw v21_2;
                                    }
                                } else {
                                    String v0_45 = new String[v29];
                                    String[] v33 = v0_45;
                                    v44.copyInto(v33);
                                    int v24 = kawa.repl.processArgs(v33, 0, v29);
                                    if ((v24 < 0) || (v24 >= v29)) {
                                    } else {
                                        System.err.println(new StringBuilder().append("").append((v29 - v24)).append(" unused meta args").toString());
                                    }
                                }
                            }
                        }
                    } else {
                        String v18 = v14_0.substring(8);
                        int v46_5 = (p46 + 1);
                        int v37 = 0;
                        if (v18.length() > 0) {
                            try {
                                v37 = Integer.parseInt(v18);
                            } catch (java.io.IOException v21) {
                                v46_5 = p47;
                            }
                        }
                        if (v46_5 == p47) {
                            kawa.repl.bad_option(v14_0);
                        }
                        String v22_1 = p45[v46_5];
                        kawa.repl.getLanguageFromFilenameExtension(v22_1);
                        kawa.repl.setArgs(p45, (v46_5 + 1));
                        kawa.repl.checkInitFile();
                        if (!kawa.Shell.runFileOrClass(v22_1, 1, v37)) {
                            System.exit(-1);
                        }
                        v3_46 = -1;
                        return v3_46;
                    }
                } else {
                    p46++;
                    if (p46 == p47) {
                        kawa.repl.bad_option(v14_0);
                    }
                    String v22_2 = p45[p46];
                    kawa.repl.getLanguageFromFilenameExtension(v22_2);
                    kawa.repl.setArgs(p45, (p46 + 1));
                    kawa.repl.checkInitFile();
                    if (!kawa.Shell.runFileOrClass(v22_2, 1, 0)) {
                        System.exit(-1);
                    }
                    v39 = 1;
                }
            } else {
                p46++;
                if (p46 == p47) {
                    kawa.repl.bad_option(v14_0);
                }
                kawa.repl.getLanguage();
                kawa.repl.setArgs(p45, (p46 + 1));
                if (v14_0.equals("-c")) {
                    kawa.repl.checkInitFile();
                }
                gnu.expr.Language v2 = gnu.expr.Language.getDefaultLanguage();
                gnu.text.SourceMessages v7_3 = new gnu.text.SourceMessages();
                java.io.IOException v21_4 = kawa.Shell.run(v2, gnu.mapping.Environment.getCurrent(), new gnu.mapping.CharArrayInPort(p45[p46]), gnu.mapping.OutPort.outDefault(), 0, v7_3);
                if (v21_4 != null) {
                    kawa.Shell.printError(v21_4, v7_3, gnu.mapping.OutPort.errDefault());
                    System.exit(-1);
                }
                v39 = 1;
            }
        }
        if (v39 == 0) {
            v3_46 = p46;
        } else {
            v3_46 = -1;
        }
        return v3_46;
    }

Method com.google.appinventor.components.runtime.util.NanoHTTPD.<init>() calling method java.net.ServerSocket.<init>()


    public NanoHTTPD(int p10, java.io.File p11)
    {
        this.myExecutor = new java.util.concurrent.ThreadPoolExecutor(2, 10, 5, java.util.concurrent.TimeUnit.SECONDS, new java.util.concurrent.SynchronousQueue(), new com.google.appinventor.components.runtime.util.NanoHTTPD$myThreadFactory(this, 0));
        this.myTcpPort = p10;
        this.myRootDir = p11;
        this.myServerSocket = new java.net.ServerSocket(this.myTcpPort);
        this.myThread = new Thread(new com.google.appinventor.components.runtime.util.NanoHTTPD$1(this));
        this.myThread.setDaemon(1);
        this.myThread.start();
        return;
    }

Method com.google.appinventor.components.runtime.MapFeatureContainerBase.loadUrl() calling method java.net.URL.<init>()


    private String loadUrl(String p14)
    {
        String v9 = 0;
        try {
            java.net.URLConnection v2 = new java.net.URL(p14).openConnection();
            v2.connect();
        } catch (java.io.IOException v4) {
            this.$form().runOnUiThread(new com.google.appinventor.components.runtime.MapFeatureContainerBase$4(this, p14));
            return v9;
        } catch (java.io.IOException v4) {
            this.$form().runOnUiThread(new com.google.appinventor.components.runtime.MapFeatureContainerBase$5(this, p14));
            return v9;
        }
        if ((v2 instanceof java.net.HttpURLConnection)) {
            java.net.HttpURLConnection v1 = ((java.net.HttpURLConnection) v2);
            int v7 = v1.getResponseCode();
            String v8 = v1.getResponseMessage();
            if (v7 != 200) {
                this.$form().runOnUiThread(new com.google.appinventor.components.runtime.MapFeatureContainerBase$3(this, p14, v7, v8));
                v1.disconnect();
                return v9;
            }
        }
        java.io.BufferedReader v6_1 = new java.io.BufferedReader(new java.io.InputStreamReader(v2.getInputStream(), "UTF-8"));
        StringBuilder v3_1 = new StringBuilder();
        while(true) {
            String v5 = v6_1.readLine();
            if (v5 == null) {
                break;
            }
            v3_1.append(v5);
            v3_1.append("\n");
        }
        v6_1.close();
        v9 = v3_1.toString();
        return v9;
    }

Method gnu.text.URLPath.resolve() calling method java.net.URL.<init>()


    public gnu.text.Path resolve(String p4)
    {
        try {
            return gnu.text.URLPath.valueOf(new java.net.URL(this.url, p4));
        } catch (Throwable v0) {
            throw gnu.mapping.WrappedException.wrapIfNeeded(v0);
        }
    }

Method com.google.appinventor.components.runtime.YandexTranslate.performRequest() calling method java.net.URL.<init>()


    private void performRequest(String p11, String p12)
    {
        java.net.HttpURLConnection v0_1 = ((java.net.HttpURLConnection) new java.net.URL(new StringBuilder().append("https://translate.yandex.net/api/v1.5/tr.json/translate?key=").append(this.yandexKey).append("&lang=").append(p11).append("&text=").append(java.net.URLEncoder.encode(p12, "UTF-8")).toString()).openConnection());
        if (v0_1 != null) {
            try {
                org.json.JSONObject v2_1 = new org.json.JSONObject(com.google.appinventor.components.runtime.YandexTranslate.getResponseContent(v0_1));
                this.activity.runOnUiThread(new com.google.appinventor.components.runtime.YandexTranslate$2(this, v2_1.getString("code"), ((String) v2_1.getJSONArray("text").get(0))));
                v0_1.disconnect();
            } catch (Throwable v8_11) {
                v0_1.disconnect();
                throw v8_11;
            }
        }
        return;
    }

Method com.google.appinventor.components.runtime.MediaStore.PostMedia() calling method java.net.URL.<init>()


    public void PostMedia(String p17)
    {
        com.google.appinventor.components.runtime.MediaStore$1 v7_1 = new com.google.appinventor.components.runtime.MediaStore$1(this);
        try {
            String v8;
            org.apache.http.impl.client.DefaultHttpClient v1_1 = new org.apache.http.impl.client.DefaultHttpClient();
            org.apache.http.entity.mime.MultipartEntityBuilder v4 = org.apache.http.entity.mime.MultipartEntityBuilder.create();
            v4.setMode(org.apache.http.entity.mime.HttpMultipartMode.BROWSER_COMPATIBLE);
        } catch (Exception v2) {
            v2.printStackTrace();
            v7_1.onFailure(v2.getMessage());
            return;
        }
        if (!p17.split("/")[0].equals("file:")) {
            v8 = p17;
        } else {
            v8 = new java.io.File(new java.net.URL(p17).toURI()).getAbsolutePath();
        }
        v4.addPart("file", new org.apache.http.entity.mime.content.FileBody(new java.io.File(v8)));
        org.apache.http.HttpEntity v3 = v4.build();
        org.apache.http.client.methods.HttpPost v10_1 = new org.apache.http.client.methods.HttpPost(this.getUploadUrl());
        v10_1.setEntity(v3);
        v7_1.onSuccess(org.apache.http.util.EntityUtils.toString(v1_1.execute(v10_1).getEntity()));
        return;
    }

Method com.google.appinventor.components.runtime.MediaStore.getUploadUrl() calling method java.net.URL.<init>()


    private String getUploadUrl()
    {
        try {
            java.net.HttpURLConnection v1_1 = ((java.net.HttpURLConnection) new java.net.URL(this.serviceURL).openConnection());
            v1_1.setRequestMethod("GET");
            v1_1.setRequestProperty("User-Agent", "AppInventor");
            v1_1.setRequestProperty("Content-Type", "text/plain; charset=utf-8");
            java.io.BufferedReader v3_1 = new java.io.BufferedReader(new java.io.InputStreamReader(v1_1.getInputStream()));
            StringBuilder v6_1 = new StringBuilder();
        } catch (Exception v2) {
            v2.printStackTrace();
            String v8_3 = "";
            return v8_3;
        }
        while(true) {
            String v4 = v3_1.readLine();
            if (v4 == null) {
                break;
            }
            v6_1.append(v4);
        }
        v3_1.close();
        v8_3 = v6_1.toString();
        return v8_3;
    }

Method org.acra.sender.HttpPostSender.send() calling method java.net.URL.<init>()


    public void send(org.acra.collector.CrashReportData p10)
    {
        String v3 = 0;
        try {
            java.net.URL v4_1;
            java.util.Map v1 = this.remap(p10);
        } catch (java.io.IOException v0) {
            throw new org.acra.sender.ReportSenderException("Error while sending report to Http Post Form.", v0);
        }
        if (this.mFormUri != null) {
            v4_1 = new java.net.URL(this.mFormUri.toString());
        } else {
            v4_1 = new java.net.URL(org.acra.ACRA.getConfig().formUri());
        }
        String v2;
        android.util.Log.d(org.acra.ACRA.LOG_TAG, new StringBuilder().append("Connect to ").append(v4_1.toString()).toString());
        if (!org.acra.sender.HttpPostSender.isNull(org.acra.ACRA.getConfig().formUriBasicAuthLogin())) {
            v2 = org.acra.ACRA.getConfig().formUriBasicAuthLogin();
        } else {
            v2 = 0;
        }
        if (!org.acra.sender.HttpPostSender.isNull(org.acra.ACRA.getConfig().formUriBasicAuthPassword())) {
            v3 = org.acra.ACRA.getConfig().formUriBasicAuthPassword();
        }
        org.acra.util.HttpRequest v5_1 = new org.acra.util.HttpRequest();
        v5_1.setConnectionTimeOut(org.acra.ACRA.getConfig().connectionTimeout());
        v5_1.setSocketTimeOut(org.acra.ACRA.getConfig().socketTimeout());
        v5_1.setMaxNrRetries(org.acra.ACRA.getConfig().maxNumberOfRequestRetries());
        v5_1.setLogin(v2);
        v5_1.setPassword(v3);
        v5_1.sendPost(v4_1, v1);
        return;
    }

Method org.acra.sender.GoogleFormSender.send() calling method java.net.URL.<init>()


    public void send(org.acra.collector.CrashReportData p10)
    {
        android.net.Uri v2;
        if (this.mFormUri != null) {
            v2 = this.mFormUri;
        } else {
            org.acra.sender.ReportSenderException v5_15 = org.acra.ACRA.getConfig().googleFormUrlFormat();
            String v6_10 = new Object[1];
            v6_10[0] = org.acra.ACRA.getConfig().formKey();
            v2 = android.net.Uri.parse(String.format(v5_15, v6_10));
        }
        java.util.Map v1 = this.remap(p10);
        v1.put("pageNumber", "0");
        v1.put("backupCache", "");
        v1.put("submit", "Envoyer");
        try {
            java.net.URL v3_1 = new java.net.URL(v2.toString());
            android.util.Log.d(org.acra.ACRA.LOG_TAG, new StringBuilder().append("Sending report ").append(((String) p10.get(org.acra.ReportField.REPORT_ID))).toString());
            android.util.Log.d(org.acra.ACRA.LOG_TAG, new StringBuilder().append("Connect to ").append(v3_1).toString());
            org.acra.util.HttpRequest v4_1 = new org.acra.util.HttpRequest();
            v4_1.setConnectionTimeOut(org.acra.ACRA.getConfig().connectionTimeout());
            v4_1.setSocketTimeOut(org.acra.ACRA.getConfig().socketTimeout());
            v4_1.setMaxNrRetries(org.acra.ACRA.getConfig().maxNumberOfRequestRetries());
            v4_1.sendPost(v3_1, v1);
            return;
        } catch (java.io.IOException v0) {
            throw new org.acra.sender.ReportSenderException("Error while sending report to Google Form.", v0);
        }
    }

Method gnu.bytecode.dump.main() calling method java.net.URL.<init>()


    public static void main(String[] p27)
    {
        int v4 = p27.length;
        gnu.bytecode.ClassTypeWriter v19 = new gnu.bytecode.ClassTypeWriter;
        v19(0, System.out, 0);
        if (v4 == 0) {
            gnu.bytecode.dump.usage(System.err);
        }
        int v14 = 0;
        while (v14 < v4) {
            String v12 = p27[v14];
            if ((!v12.equals("-verbose")) && (!v12.equals("--verbose"))) {
                try {
                    int v15_0;
                    if (!gnu.bytecode.dump.uriSchemeSpecified(v12)) {
                        try {
                            v15_0 = new java.io.FileInputStream(v12);
                        } catch (java.util.zip.ZipException v8) {
                            try {
                                ClassLoader v18 = gnu.bytecode.ObjectType.getContextClass(v12).getClassLoader();
                            } catch (java.io.FileNotFoundException v9) {
                                v18 = gnu.bytecode.ObjectType.getContextClassLoader();
                            }
                            try {
                                java.net.URL v21 = v18.getResource(new StringBuilder().append(v12.replace(46, 47)).append(".class").toString());
                                v15_0 = v21.openConnection().getInputStream();
                                v12 = v21.toString();
                            } catch (Throwable v10) {
                                System.err.print("Can\'t find .class file for class ");
                                System.err.print(v12);
                                System.err.print(" - ");
                                System.err.println(v10);
                                System.exit(-1);
                                v15_0 = 0;
                            }
                        }
                    } else {
                        int v16 = v12.startsWith("jar:");
                        if (v16 != 0) {
                            String v20_0 = v12.substring(4);
                            if (!gnu.bytecode.dump.uriSchemeSpecified(v20_0)) {
                                int v11_0 = v20_0.indexOf(33);
                                if (v11_0 >= 0) {
                                    int v24_3 = new java.io.File;
                                    v24_3(v20_0.substring(0, v11_0));
                                    v12 = new StringBuilder().append("jar:").append(v24_3.toURI().toURL().toString()).append(v20_0.substring(v11_0)).toString();
                                }
                            }
                            if (v20_0.indexOf("!/") < 0) {
                                int v11_1 = v12.lastIndexOf(33);
                                if (v11_1 > 0) {
                                    if (v12.indexOf(47, v11_1) < 0) {
                                        v12 = new StringBuilder().append(v12.substring(0, (v11_1 + 1))).append(47).append(v12.substring((v11_1 + 1)).replace(46, 47)).append(".class").toString();
                                    }
                                } else {
                                    v16 = 0;
                                }
                            }
                        }
                        try {
                            java.net.URL v23 = new java.net.URL;
                            v23(v12);
                            try {
                                v15_0 = v23.openConnection().getInputStream();
                            } catch (java.util.zip.ZipException v8_0) {
                                if (v16 != 0) {
                                    String v13_2 = v23.getFile();
                                    int v22 = v13_2.lastIndexOf(33);
                                    if (v22 > 0) {
                                        v13_2 = v13_2.substring(0, v22);
                                    }
                                    try {
                                        int v24_30 = new java.net.URL;
                                        v24_30(v13_2);
                                        v24_30.openConnection().getInputStream();
                                    } catch (java.io.FileNotFoundException v9) {
                                        System.err.print("Jar File for URL ");
                                        System.err.print(v13_2);
                                        System.err.println(" not found.");
                                        System.exit(-1);
                                    }
                                }
                                throw v8_0;
                            }
                        } catch (java.util.zip.ZipException v8) {
                            System.err.print("File for URL ");
                            System.err.print(v12);
                            System.err.println(" not found.");
                            System.exit(-1);
                            v15_0 = 0;
                        } catch (java.util.zip.ZipException v8_1) {
                            System.err.print("Error opening zip archive ");
                            System.err.print(v12);
                            System.err.println(" not found.");
                            v8_1.printStackTrace();
                            if (v8_1.getCause() != null) {
                                v8_1.getCause().printStackTrace();
                            }
                            System.exit(-1);
                            v15_0 = 0;
                        }
                    }
                    gnu.bytecode.dump.process(v15_0, v12, v19);
                } catch (java.io.IOException v7) {
                    v7.printStackTrace();
                    System.err.println("caught ");
                    System.err.print(v7);
                    System.exit(-1);
                }
            } else {
                v19.setFlags(15);
            }
            v14++;
        }
        return;
    }

Method gnu.text.ResourceStreamHandler.makeURL() calling method java.net.URL.<init>()


    public static java.net.URL makeURL(Class p8)
    {
        String v0 = p8.getName();
        int v1 = v0.lastIndexOf(46);
        StringBuilder v3_1 = new StringBuilder();
        v3_1.append("class-resource:/");
        if (v1 >= 0) {
            v3_1.append(v0.substring(0, v1));
            v3_1.append(47);
            v0 = v0.substring((v1 + 1));
        }
        v3_1.append(v0);
        return new java.net.URL(0, v3_1.toString(), new gnu.text.ResourceStreamHandler(p8.getClassLoader()));
    }

Method gnu.text.Path.toURL() calling method java.net.URL.<init>()


    public static java.net.URL toURL(String p4)
    {
        try {
            java.net.URL v3_2;
            if (gnu.text.Path.uriSchemeSpecified(p4)) {
                v3_2 = new java.net.URL(p4);
            } else {
                gnu.text.Path v2 = gnu.text.Path.currentPath().resolve(p4);
                if (!v2.isAbsolute()) {
                    p4 = v2.toString();
                } else {
                    v3_2 = v2.toURL();
                }
            }
        } catch (Throwable v1) {
            throw gnu.mapping.WrappedException.wrapIfNeeded(v1);
        }
        return v3_2;
    }

Method gnu.bytecode.ArrayClassLoader.findResource() calling method java.net.URL.<init>()


    protected java.net.URL findResource(String p3)
    {
        java.net.URL v0_0;
        if (this.context == null) {
            v0_0 = super.findResource(p3);
        } else {
            try {
                v0_0 = new java.net.URL(this.context, p3);
                v0_0.openConnection().connect();
            } catch (Throwable v1) {
            }
        }
        return v0_0;
    }

Method com.google.appinventor.components.runtime.util.MediaUtil.openMedia() calling method java.net.URL.<init>()


    private static java.io.InputStream openMedia(com.google.appinventor.components.runtime.Form p4, String p5, com.google.appinventor.components.runtime.util.MediaUtil$MediaSource p6)
    {
        java.io.InputStream v0_0;
        switch (com.google.appinventor.components.runtime.util.MediaUtil$3.$SwitchMap$com$google$appinventor$components$runtime$util$MediaUtil$MediaSource[p6.ordinal()]) {
            case 1:
                v0_0 = com.google.appinventor.components.runtime.util.MediaUtil.getAssetsIgnoreCaseInputStream(p4, p5);
                break;
            case 2:
                p4.assertPermission("android.permission.READ_EXTERNAL_STORAGE");
                v0_0 = new java.io.FileInputStream(com.google.appinventor.components.runtime.util.MediaUtil.replAssetPath(p5));
                break;
            case 3:
                p4.assertPermission("android.permission.READ_EXTERNAL_STORAGE");
                v0_0 = new java.io.FileInputStream(p5);
                break;
            case 4:
                if (!com.google.appinventor.components.runtime.util.MediaUtil.isExternalFileUrl(p5)) {
                    v0_0 = new java.net.URL(p5).openStream();
                } else {
                    p4.assertPermission("android.permission.READ_EXTERNAL_STORAGE");
                }
            case 6:
                v0_0 = p4.getContentResolver().openInputStream(android.net.Uri.parse(p5));
                break;
            case 7:
                if (com.google.appinventor.components.runtime.util.SdkLevel.getLevel() < 12) {
                    v0_0 = android.provider.Contacts$People.openContactPhotoInputStream(p4.getContentResolver(), android.net.Uri.parse(p5));
                } else {
                    v0_0 = com.google.appinventor.components.runtime.util.HoneycombMR1Util.openContactPhotoInputStreamHelper(p4.getContentResolver(), android.net.Uri.parse(p5));
                }
                if (v0_0 != null) {
                } else {
                    throw new java.io.IOException(new StringBuilder().append("Unable to open contact photo ").append(p5).append(".").toString());
                }
                break;
            default:
                throw new java.io.IOException(new StringBuilder().append("Unable to open media ").append(p5).append(".").toString());
        }
        return v0_0;
    }

Method com.google.appinventor.components.runtime.util.MediaUtil.fileUrlToFilePath() calling method java.net.URL.<init>()


    static String fileUrlToFilePath(String p4)
    {
        try {
            return new java.io.File(new java.net.URL(p4).toURI()).getAbsolutePath();
        } catch (Exception v0) {
            throw new java.io.IOException(new StringBuilder().append("Unable to determine file path of file url ").append(p4).toString());
        } catch (Exception v0) {
            throw new java.io.IOException(new StringBuilder().append("Unable to determine file path of file url ").append(p4).toString());
        }
    }

Method com.google.appinventor.components.runtime.util.MediaUtil.determineMediaSource() calling method java.net.URL.<init>()


    private static com.google.appinventor.components.runtime.util.MediaUtil$MediaSource determineMediaSource(com.google.appinventor.components.runtime.Form p1, String p2)
    {
        if ((!p2.startsWith("/sdcard/")) && (!p2.startsWith(android.os.Environment.getExternalStorageDirectory().getAbsolutePath()))) {
            if (!p2.startsWith("content://contacts/")) {
                if (!p2.startsWith("content://")) {
                    try {
                        new java.net.URL(p2);
                    } catch (com.google.appinventor.components.runtime.util.MediaUtil$MediaSource v0) {
                        if (!(p1 instanceof com.google.appinventor.components.runtime.ReplForm)) {
                            com.google.appinventor.components.runtime.util.MediaUtil$MediaSource v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.ASSET;
                        } else {
                            if (!((com.google.appinventor.components.runtime.ReplForm) p1).isAssetsLoaded()) {
                                v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.ASSET;
                            } else {
                                v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.REPL_ASSET;
                            }
                        }
                    }
                    if (!p2.startsWith("file:")) {
                        v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.URL;
                    } else {
                        v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.FILE_URL;
                    }
                } else {
                    v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.CONTENT_URI;
                }
            } else {
                v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.CONTACT_URI;
            }
        } else {
            v0_9 = com.google.appinventor.components.runtime.util.MediaUtil$MediaSource.SDCARD;
        }
        return v0_9;
    }

Method com.google.appinventor.components.runtime.util.FileUtil.downloadUrlToFile() calling method java.net.URL.<init>()


    public static String downloadUrlToFile(String p2, String p3)
    {
        java.io.InputStream v0 = new java.net.URL(p2).openStream();
        try {
            Throwable v1_2 = com.google.appinventor.components.runtime.util.FileUtil.writeStreamToFile(v0, p3);
            v0.close();
            return v1_2;
        } catch (Throwable v1_3) {
            v0.close();
            throw v1_3;
        }
    }

Method com.google.appinventor.components.runtime.util.AssetFetcher.getFile() calling method java.net.URL.<init>()


    private static java.io.File getFile(String p18, String p19, String p20, int p21)
    {
        try {
            java.io.File v10;
            if (p21 <= 1) {
                int v6 = 0;
                v10 = 0;
                try {
                    java.net.HttpURLConnection v4_0 = ((java.net.HttpURLConnection) new java.net.URL(p18).openConnection());
                } catch (java.io.IOException v5) {
                    android.util.Log.e(com.google.appinventor.components.runtime.util.AssetFetcher.LOG_TAG, new StringBuilder().append("Exception while fetching ").append(p18).toString());
                    v10 = com.google.appinventor.components.runtime.util.AssetFetcher.getFile(p18, p19, p20, (p21 + 1));
                }
                if (v4_0 == null) {
                    v6 = 1;
                } else {
                    v4_0.setRequestMethod("GET");
                    v4_0.addRequestProperty("Cookie", new StringBuilder().append("AppInventor = ").append(p19).toString());
                    android.util.Log.d(com.google.appinventor.components.runtime.util.AssetFetcher.LOG_TAG, new StringBuilder().append("asset = ").append(p20).append(" responseCode = ").append(v4_0.getResponseCode()).toString());
                    java.io.File v11_1 = new java.io.File(new StringBuilder().append(com.google.appinventor.components.runtime.util.AssetFetcher.REPL_ASSET_DIR).append(p20).toString());
                    try {
                        java.io.File v12 = v11_1.getParentFile();
                    } catch (java.io.IOException v5) {
                    }
                    if (!v12.exists()) {
                        v12.mkdirs();
                    }
                    java.io.BufferedInputStream v8_1 = new java.io.BufferedInputStream(v4_0.getInputStream(), 4096);
                    java.io.BufferedOutputStream v9_1 = new java.io.BufferedOutputStream(new java.io.FileOutputStream(v11_1), 4096);
                    try {
                        while(true) {
                            int v3 = v8_1.read();
                            v9_1.write(v3);
                        }
                        v9_1.flush();
                        v9_1.close();
                        v4_0.disconnect();
                        v10 = v11_1;
                    } catch (String v15_23) {
                        v9_1.close();
                        throw v15_23;
                    } catch (java.io.IOException v5) {
                        android.util.Log.e(com.google.appinventor.components.runtime.util.AssetFetcher.LOG_TAG, "copying assets", v5);
                        v6 = 1;
                        v9_1.close();
                    }
                    if (v3 != -1) {
                    }
                }
                if (v6 != 0) {
                    v10 = com.google.appinventor.components.runtime.util.AssetFetcher.getFile(p18, p19, p20, (p21 + 1));
                }
            } else {
                if (!com.google.appinventor.components.runtime.util.AssetFetcher.inError) {
                    com.google.appinventor.components.runtime.util.AssetFetcher.inError = 1;
                    com.google.appinventor.components.runtime.Form.getActiveForm().runOnUiThread(new com.google.appinventor.components.runtime.util.AssetFetcher$2(p18));
                    v10 = 0;
                } else {
                    v10 = 0;
                }
            }
        } catch (String v15_9) {
            throw v15_9;
        }
        return v10;
    }

Method com.google.appinventor.components.runtime.Web$CapturedProperties.<init>() calling method java.net.URL.<init>()


    Web$CapturedProperties(com.google.appinventor.components.runtime.Web p5)
    {
        this.urlString = com.google.appinventor.components.runtime.Web.access$000(p5);
        this.url = new java.net.URL(this.urlString);
        this.allowCookies = com.google.appinventor.components.runtime.Web.access$100(p5);
        this.saveResponse = com.google.appinventor.components.runtime.Web.access$200(p5);
        this.responseFileName = com.google.appinventor.components.runtime.Web.access$300(p5);
        this.requestHeaders = com.google.appinventor.components.runtime.Web.access$500(com.google.appinventor.components.runtime.Web.access$400(p5));
        java.util.Map v0 = 0;
        if ((this.allowCookies) && (com.google.appinventor.components.runtime.Web.access$600(p5) != null)) {
            try {
                v0 = com.google.appinventor.components.runtime.Web.access$600(p5).get(this.url.toURI(), this.requestHeaders);
            } catch (java.io.IOException v1) {
            } catch (java.io.IOException v1) {
            }
        }
        this.cookies = v0;
        return;
    }

Method com.google.appinventor.components.runtime.Texting$GoogleVoiceUtil.get() calling method java.net.URL.<init>()


    String get(String p15)
    {
        java.net.HttpURLConnection v0_1 = ((java.net.HttpURLConnection) new java.net.URL(p15).openConnection());
        try {
            String v7;
            java.io.InputStream v2;
            v0_1.setRequestProperty("Authorization", new StringBuilder().append("GoogleLogin auth=").append(this.authToken).toString());
            v0_1.setRequestProperty("User-agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.A.B.C Safari/525.13");
            v0_1.setInstanceFollowRedirects(0);
            this.setCookies(v0_1);
            v0_1.connect();
            int v6 = v0_1.getResponseCode();
            android.util.Log.i("Texting Component", new StringBuilder().append(p15).append(" - ").append(v0_1.getResponseMessage()).toString());
            this.processCookies(v0_1);
        } catch (Exception v1) {
            throw new java.io.IOException(new StringBuilder().append(p15).append(" : ").append(v0_1.getResponseMessage()).append("(").append(v6).append(") : IO Error.").toString());
        }
        if (v6 != 200) {
            if ((v6 != 301) && ((v6 != 302) && ((v6 != 303) && (v6 != 307)))) {
                v2 = v0_1.getErrorStream();
                this.redirectCounter = 0;
                if (v2 != null) {
                    try {
                        java.io.BufferedReader v5_1 = new java.io.BufferedReader(new java.io.InputStreamReader(v2));
                        StringBuffer v8_1 = new StringBuffer();
                    } catch (Exception v1) {
                        throw new java.io.IOException(new StringBuilder().append(p15).append(" - ").append(v0_1.getResponseMessage()).append("(").append(v6).append(") - ").append(v1.getLocalizedMessage()).toString());
                    }
                    while(true) {
                        String v3 = v5_1.readLine();
                        if (v3 == null) {
                            break;
                        }
                        v8_1.append(new StringBuilder().append(v3).append("\n\r").toString());
                    }
                    v5_1.close();
                    v7 = v8_1.toString();
                } else {
                    throw new java.io.IOException(new StringBuilder().append(p15).append(" : ").append(v0_1.getResponseMessage()).append("(").append(v6).append(") : InputStream was null : exiting.").toString());
                }
            } else {
                this.redirectCounter = (this.redirectCounter + 1);
                if (this.redirectCounter <= 5) {
                    String v4 = v0_1.getHeaderField("Location");
                    if ((v4 == null) || (v4.equals(""))) {
                        throw new java.io.IOException(new StringBuilder().append(p15).append(" : ").append(v0_1.getResponseMessage()).append("(").append(v6).append(") : Received moved answer but no Location. exiting.").toString());
                    } else {
                        System.out.println(new StringBuilder().append(p15).append(" - ").append(v6).append(" - new URL: ").append(v4).toString());
                        v7 = this.get(v4);
                    }
                } else {
                    this.redirectCounter = 0;
                    throw new java.io.IOException(new StringBuilder().append(p15).append(" : ").append(v0_1.getResponseMessage()).append("(").append(v6).append(") : Too many redirects. exiting.").toString());
                }
            }
        } else {
            v2 = v0_1.getInputStream();
        }
        return v7;
    }

Method com.google.appinventor.components.runtime.Texting$GoogleVoiceUtil.sendGvSms() calling method java.net.URL.<init>()


    private String sendGvSms(String p11)
    {
        android.util.Log.i("Texting Component", "sendGvSms()");
        StringBuilder v4_1 = new StringBuilder();
        try {
            String v11_1 = new StringBuilder().append(p11).append("&").append(java.net.URLEncoder.encode("_rnr_se", "UTF-8")).append("=").append(java.net.URLEncoder.encode(this.rnrSEE, "UTF-8")).toString();
            android.util.Log.i("Texting Component", new StringBuilder().append("smsData = ").append(v11_1).toString());
            java.net.HttpURLConnection v5_1 = ((java.net.HttpURLConnection) new java.net.URL("https://www.google.com/voice/b/0/sms/send/").openConnection());
            v5_1.setRequestProperty("Authorization", new StringBuilder().append("GoogleLogin auth=").append(this.authToken).toString());
            v5_1.setRequestProperty("User-agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.A.B.C Safari/525.13");
            this.setCookies(v5_1);
            v5_1.setDoOutput(1);
            v5_1.setConnectTimeout(30000);
            android.util.Log.i("Texting Component", new StringBuilder().append("sms request = ").append(v5_1).toString());
            java.io.OutputStreamWriter v1_1 = new java.io.OutputStreamWriter(v5_1.getOutputStream());
            v1_1.write(v11_1);
            v1_1.flush();
            this.processCookies(v5_1);
            java.io.BufferedReader v0_1 = new java.io.BufferedReader(new java.io.InputStreamReader(v5_1.getInputStream()));
        } catch (java.io.IOException v2) {
            android.util.Log.i("Texting Component", new StringBuilder().append("IO Error on Send ").append(v2.getMessage()).toString(), v2);
            String v7_3 = "IO Error Message not sent";
            return v7_3;
        }
        while(true) {
            String v3 = v0_1.readLine();
            if (v3 == null) {
                break;
            }
            v4_1.append(v3);
            v4_1.append("\n");
        }
        android.util.Log.i("Texting Component", new StringBuilder().append("sendGvSms:  Sent SMS, response = ").append(v4_1).toString());
        v1_1.close();
        v0_1.close();
        if (v4_1.length() != 0) {
            v7_3 = v4_1.toString();
            return v7_3;
        } else {
            throw new java.io.IOException("No Response Data Received.");
        }
    }