static byte[] loadBinaryPageSilently(String url) ctex { return loadBinaryPageSilently(openConnection(new URL(url))); } static byte[] loadBinaryPageSilently(URLConnection con) ctex { setHeaders(con); ret loadBinaryPageSilently_noHeaders(con); } static byte[] loadBinaryPageSilently_noHeaders(URLConnection con) ctex { new ByteArrayOutputStream buf; InputStream inputStream = con.getInputStream(); long len = 0; try { len = con.getContentLength/*Long*/(); } catch (Throwable e) { printStackTrace(e); } int n = 0; while (true) { int ch = inputStream.read(); if (ch < 0) break; buf.write(ch); } inputStream.close(); ret buf.toByteArray(); }