public void saveUrl(String fileName, File directory, String urlString,
			boolean display) throws MalformedURLException, IOException {
		BufferedInputStream in = null;
		FileOutputStream fout = null;
		try {
			File file = new File(directory, fileName);
			URLConnection c = new URL(urlString).openConnection();
			c.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11");
			c.connect();
			InputStream ins = new BufferedInputStream(c.getInputStream());
			fout = new FileOutputStream(file);
			byte data[] = new byte[1024];
			int count = 0;
			int max = c.getContentLength();
			if (display) {
				ConsoleTab.getInstance().dl.setVisible(true);
				ConsoleTab.getInstance().dl.setMaximum(max);
				ConsoleTab.getInstance().dlLabel.setVisible(true);
				ConsoleTab.getInstance().dlLabel.setText("Downloading - "
						+ fileName);
			}
			long con = 0;
			while ((count = ins.read(data)) != -1) {
				if (display) {
					con += count;
					ConsoleTab.getInstance().dl.setValue((int) con);
				}
				fout.write(data, 0, count);
			}
		} finally {
			if (in != null)
				in.close();
			if (fout != null)
				fout.close();
		}
	}