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 gob.defensa.prensa.helpers.RemoteFacade.storeFileFromUrl() calling method java.net.URL.<init>()


    public void storeFileFromUrl(String p13, String p14)
    {
        try {
            java.net.HttpURLConnection v10_1 = ((java.net.HttpURLConnection) new java.net.URL(p13).openConnection());
            v10_1.setRequestMethod("GET");
            v10_1.setDoOutput(1);
            v10_1.connect();
            java.io.FileOutputStream v6_1 = new java.io.FileOutputStream(new java.io.File(android.os.Environment.getExternalStorageDirectory(), p14));
            java.io.InputStream v7 = v10_1.getInputStream();
            v10_1.getContentLength();
            int v3 = 0;
            byte[] v1 = new byte[1024];
        } catch (java.io.IOException v4_1) {
            v4_1.printStackTrace();
            return;
        } catch (java.io.IOException v4_0) {
            v4_0.printStackTrace();
            return;
        }
        while(true) {
            int v2 = v7.read(v1);
            if (v2 <= 0) {
                break;
            }
            v6_1.write(v1, 0, v2);
            v3 += v2;
        }
        v6_1.close();
        return;
    }

Method gob.defensa.prensa.helpers.RemoteFacade.stringFromServer() calling method java.net.URL.<init>()


    public static String stringFromServer(String p14)
    {
        int v1 = 0;
        int v7 = 0;
        java.net.URL v9 = 0;
        try {
            v1 = 0;
            try {
                v1 = ((java.net.HttpURLConnection) new java.net.URL(p14).openConnection());
                v1.setRequestMethod("GET");
                v1.setDoOutput(1);
                v1.connect();
                java.io.BufferedReader v5_1 = new java.io.BufferedReader(new java.io.InputStreamReader(v1.getInputStream(), "UTF-8"));
                try {
                    StringBuilder v8_1 = new StringBuilder();
                    try {
                        while(true) {
                            String v3 = v5_1.readLine();
                            v8_1.append(new StringBuilder().append(v3).append(10).toString());
                        }
                        String v6 = v8_1.toString();
                        try {
                            v1.disconnect();
                        } catch (Exception v11) {
                        }
                        v7 = 0;
                        return v6;
                    } catch (Exception v11_5) {
                        v7 = v8_1;
                        try {
                            v1.disconnect();
                        } catch (int v12) {
                        }
                        v7 = 0;
                        throw v11_5;
                    } catch (java.io.IOException v2_1) {
                        v7 = v8_1;
                        android.util.Log.e("RemoteFacade", new StringBuilder().append("RemoteFacade: sendToServer ").append(v2_1).toString());
                        throw new gob.defensa.prensa.helpers.SystemException(v2_1, new StringBuilder().append("sendToServer ").append(v2_1).toString());
                    } catch (java.io.IOException v2_0) {
                        v7 = v8_1;
                        android.util.Log.e("RemoteFacade", new StringBuilder().append("RemoteFacade: sendToServer ").append(v2_0).toString());
                        throw new gob.defensa.prensa.helpers.SystemException(v2_0, new StringBuilder().append("sendToServer ").append(v2_0).toString());
                    } catch (java.io.IOException v2_2) {
                        v7 = v8_1;
                        android.util.Log.e("RemoteFacade", new StringBuilder().append("RemoteFacade: sendToServer ").append(v2_2).toString());
                        throw new gob.defensa.prensa.helpers.SystemException(v2_2, new StringBuilder().append("sendToServer ").append(v2_2).toString());
                    }
                    if (v3 != null) {
                    }
                } catch (Exception v11_5) {
                    int v4 = v5_1;
                } catch (java.io.IOException v2_1) {
                    v4 = v5_1;
                } catch (java.io.IOException v2_0) {
                    v4 = v5_1;
                } catch (java.io.IOException v2_2) {
                    v4 = v5_1;
                }
            } catch (Exception v11_5) {
            } catch (java.io.IOException v2_1) {
            } catch (java.io.IOException v2_0) {
            } catch (java.io.IOException v2_2) {
            }
        } catch (Exception v11_5) {
        } catch (java.io.IOException v2_1) {
        } catch (java.io.IOException v2_0) {
        }
    }

Method gob.defensa.prensa.helpers.RemoteFacade.downloadFileToCache() calling method java.net.URL.<init>()


    public static boolean downloadFileToCache(android.content.Context p12, String p13, String p14)
    {
        int v10 = 0;
        try {
            java.net.URLConnection v3 = new java.net.URL(p13).openConnection();
            v3.connect();
            java.io.InputStream v8 = v3.getInputStream();
            java.io.FileOutputStream v7_1 = new java.io.FileOutputStream(new java.io.File(p12.getCacheDir(), p14));
            v3.getContentLength();
            int v4 = 0;
            byte[] v0 = new byte[1024];
        } catch (java.io.IOException v5_1) {
            v5_1.printStackTrace();
            return v10;
        } catch (java.io.IOException v5_0) {
            v5_0.printStackTrace();
            return v10;
        }
        while(true) {
            int v1 = v8.read(v0);
            if (v1 <= 0) {
                break;
            }
            v7_1.write(v0, 0, v1);
            v4 += v1;
        }
        v7_1.close();
        v10 = 1;
        return v10;
    }

Method gob.defensa.prensa.helpers.RemoteFacade.documentFromServer() calling method java.net.URL.<init>()


    public static org.w3c.dom.Document documentFromServer(String p6)
    {
        try {
            return javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new java.net.URL(p6).openStream());
        } catch (java.io.IOException v2_2) {
            android.util.Log.e("RemoteFacade", new StringBuilder().append("RemoteFacade: documentFromServer ").append(v2_2).toString());
            throw new gob.defensa.prensa.helpers.SystemException(v2_2, new StringBuilder().append("documentFromServer ").append(v2_2).toString());
        } catch (java.io.IOException v2_1) {
            android.util.Log.e("RemoteFacade", new StringBuilder().append("RemoteFacade: documentFromServer ").append(v2_1).toString());
            throw new gob.defensa.prensa.helpers.SystemException(v2_1, new StringBuilder().append("documentFromServer ").append(v2_1).toString());
        } catch (java.io.IOException v2_0) {
            android.util.Log.e("RemoteFacade", new StringBuilder().append("RemoteFacade: documentFromServer ").append(v2_0).toString());
            throw new gob.defensa.prensa.helpers.SystemException(v2_0, new StringBuilder().append("documentFromServer ").append(v2_0).toString());
        }
    }

Method com.koushikdutta.urlimageviewhelper.HttpUrlDownloader$1.doInBackground() calling method java.net.URL.<init>()


    protected varargs Void doInBackground(Void[] p12)
    {
        try {
            String v4 = this.val$url;
        } catch (Throwable v0) {
            v0.printStackTrace();
            return 0;
        }
        while(true) {
            java.net.HttpURLConnection v6_1 = ((java.net.HttpURLConnection) new java.net.URL(v4).openConnection());
            v6_1.setInstanceFollowRedirects(1);
            if (com.koushikdutta.urlimageviewhelper.HttpUrlDownloader.access$000(this.this$0) != null) {
                java.util.ArrayList v3 = com.koushikdutta.urlimageviewhelper.HttpUrlDownloader.access$000(this.this$0).getHeadersForRequest(this.val$context, this.val$url);
                if (v3 != null) {
                    com.koushikdutta.urlimageviewhelper.UrlDownloader$UrlDownloaderCallback v7_4 = v3.iterator();
                    while (v7_4.hasNext()) {
                        org.apache.http.NameValuePair v2_1 = ((org.apache.http.NameValuePair) v7_4.next());
                        v6_1.addRequestProperty(v2_1.getName(), v2_1.getValue());
                    }
                }
            }
            if ((v6_1.getResponseCode() == 302) || (v6_1.getResponseCode() == 301)) {
                v4 = v6_1.getHeaderField("Location");
            } else {
                if (v6_1.getResponseCode() == 200) {
                    break;
                }
                com.koushikdutta.urlimageviewhelper.HttpUrlDownloader v8_9 = new Object[0];
                com.koushikdutta.urlimageviewhelper.UrlImageViewHelper.clog(new StringBuilder().append("Response Code: ").append(v6_1.getResponseCode()).toString(), v8_9);
                return 0;
            }
        }
        this.val$callback.onDownloadComplete(this.this$0, v6_1.getInputStream(), 0);
        return 0;
    }