I have a method that generates an HtmlPage, I would like to save to disk.
public void gerarPaginaIndex() {
try {
final HtmlPage paginaIndex = WebClientFactory.getInstance().getPage(URL_INICIAL);
this.criarPaginaEmDisco(paginaIndex, new File(PATH + "paginaIndex.html"));
} catch (IOException e) {
e.printStackTrace();
}
}
The createPaginaEmDisco () method receives by parameter the address to save and the HtmlPage.