我正在尝试使用以下命令下载此文件:tesseract-ocr-3.02.eng.tar.gz:
HttpURLConnection urlConnection = null;
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setAllowUserInteraction(false);
urlConnection.setInstanceFollowRedirects(true);
urlConnection.setRequestMethod("GET");
urlConnection.connect();
来自此网址=“https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz”;它不起作用。它抛出一个UnknownHostExeception并且错误来自最后一个命令urlConnection.connect();
如何修复并下载文件?