private static String downloadChecksum(String addr, int numTries) {
        final int BUFFER_SIZE = 32;

        BufferedInputStream bis = null;
        ByteArrayOutputStream baos;

        try {
            URL url = new URL(addr);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setRequestProperty("User-Agent", "User-Agent: Kubach v" + Constants.VERSION);

            int totalDataRead = 0;
            bis = new BufferedInputStream(connection.getInputStream());
            baos = new ByteArrayOutputStream();
            try (BufferedOutputStream bos = new BufferedOutputStream(baos, BUFFER_SIZE)) {
                byte[] data = new byte[BUFFER_SIZE];
                int i = 0;

                while ((i = bis.read(data)) != -1) {
                    totalDataRead = totalDataRead + i;
                    baos.write(data, 0, i);
                }

                return new String(baos.toByteArray());
            }
        } catch (IOException ex) {
            ex.printStackTrace();
            if (numTries > 0) {
                return downloadChecksum(addr, numTries - 1);
            } else {
                return null;
            }
        } finally {
            try {
                bis.close();
            } catch (IOException ex) {
                ex.printStackTrace();

                if (numTries > 0) {
                    return downloadChecksum(addr, numTries - 1);
                } else {
                    return null;
                }
            }
        }
    }