protected void download( Calendar date, String urlSuffix, Map<String, String> headers, HttpContext httpContext) throws IOException { URL url = new URL(this.baseUrl + urlSuffix); LOG.info("Downloading " + scrubUrl(url)); String filename = getFilename(date); File destFile = new File(WordsWithCrossesApplication.CROSSWORDS_DIR, filename); utils.downloadFile(url, headers, destFile, true, getName(), httpContext); }
protected String downloadUrlToString( String url, Map<String, String> headers, HttpContext httpContext) throws IOException { LOG.info("Downloading to string: " + url); return utils.downloadToString(new URL(url), headers, httpContext); }