Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Security Will i be able to get the content of a webpage in a word document (Note:i don t have access to the source code)through java code?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Priya
Will i be able to get the content of a webpage in a word document (Note:i don t have access to the source code)through java code?
0 Answer(s)      2 years and 2 months ago
Posted in : Security


public class WebpageReader {
    public static void main(String[] args) throws IOException {
        String line = null, response;
        URL url = new URL("http://www.google.co.in/");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        while (rd.readLine() != null) {
            line += rd.readLine();
        }
        System.out.println(line);

}

} I am getting output to this code as html tags....

But what i want is in a word document to the webpage(for which i don t have access to source code)


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com