How can I make the below code, save the webpage it self to txt file, I don't need the code of the webpage I need the webpage itself to be saved as text, like when we press CTRL + S and choose save as txt. As well, how to make the browse hidden. Thank you in advance :)
import java.awt.Desktop;
import java.io.File;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
Desktop d = Desktop.getDesktop();
String url = "http://w3-01.ibm.com/pc/entitle/pg2/Service.wss/mts/Lookup?type=8205&serial=06202ET";
d.browse(new URI(url));
}
}