Handling response when hit any URL
<p>I am trying to make a program in which I want, when I hit any url or u can say websites, all contents of that websites is being read by me. I am using URL class for this.</p>

<p>Here is my code ..</p>

<pre><code> import java.net.*;
 import java.io.*;
 public class URLConnectionReader 
 {
 public static void main(String[] args) throws Exception 
{
     URL oracle = new URL("http://www.oracle.com/index.html");
     URLConnection yc = oracle.openConnection();

    BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null)

    System.out.println(inputLine);

    in.close();
}
}
</code></pre>

<p>But In response it is showing view page source's contents, I want only web-page contents, not all. How can I do this?</p>
