Я пытаюсь загрузить файл HTML с сайта.Я использую следующий простой метод:
URL url = new URL("here goes the link to the html file");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String htmlfile = "";
String temp;
while ((temp = br.readLine()) != null) {
htmlfile+= temp;
}
Проблема в том, что я получаю следующую строку в переменной htmlfile:
The installation of ... requires the acceptance of a cookie by your browser
software. The cookie is used to ensure that you and only you are
able to access information ....
Другими словами, мне нужно несколько включитькуки при открытии потока с URL.Можно ли добиться этого с помощью URL или мне нужен другой метод?Заранее спасибо