I am able to write a java program to access a particular url , and get the data , but the data is in raw format and the complete source is printed in the terminal .
import java.net.*;
import java.io.*;
public class URLConnectionReader {
public static void main(String[] args) throws Exception {
URL go = new URL("http://www.google.com/");
URLConnection uc = go.openConnection();
BufferedReader in = new BufferedReader(
new InputStreamReader(
uc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
I want that raw data to be displayed as a web page. Is there any way to do that.