public static String downloadPhoto(String address, String path, String fileName) {
        try {
            URL html = new URL(address);
            URI method = new URI(html.getProtocol(), html.getUserInfo(), html.getHost(), html.getPort(), html.getPath(), html.getQuery(), html.getRef());
            address = method.toASCIIString();
        } catch (Exception var16) {
            ;
        }

        String var19 = "";
        if (!path.endsWith("\\")) {
            path = path + "\\";
        }

        GetMethod var20 = null;

        for (int j = 0; j < 20; ++j) {
            try {
                var19 = "";
                var20 = new GetMethod(address);
                client.executeMethod(var20);
                byte[] ex = var20.getResponseBody();
                FileOutputStream e = new FileOutputStream(path + fileName);
                e.write(ex);
                e.close();
                break;
            } catch (Exception var17) {
                var17.printStackTrace();
                System.out.println(address);
                if (var17.getClass().toString().indexOf("UnknownHostException") >= 0) {
                    try {
                        --j;
                        Thread.sleep(10000L);
                    } catch (InterruptedException var15) {
                        var15.printStackTrace();
                    }
                } else if (var17.getClass().toString().indexOf("FileNotFoundException") >= 0) {
                    j = 111;
                } else {
                    try {
                        Thread.sleep(10000L);
                    } catch (InterruptedException var14) {
                        var14.printStackTrace();
                    }
                }
            } finally {
                if (var20 != null) {
                    var20.releaseConnection();
                }

            }
        }

        return var19;
    }