WebClient webClient = new WebClient();
try {
HtmlPage page = webClient.getPage("https://cdn.kernel.org");
List
anchors.get(0).click();
InputStream is = page.getEnclosingWindow().getEnclosedPage().getWebResponse().getContentAsStream();
String file = "public/kernel.tar.xz";
Files.copy(is, Paths.get(file));
File f = new File(file);
} catch (IOException e) {
e.printStackTrace();
}
Nenhum comentário:
Postar um comentário