reading html from an inputstream java
- by randeel wimalagunarathne
hello everyone,
I am reading a html file using an inputstream from a java servlet.
But the contents of the original and the read one are in a different format
although when displayed in a web browser they are the same. These are the two
links for the html files
after reading output
http://www.fileflyer.com/view/gQREGAe
orginal output
http://www.fileflyer.com/view/mWXHVAE
Is there a way to get the original html when reading? why is this happening?
my java code is as follows;
InputStreamReader isr = new InputStreamReader(inputStream);
BufferedReader br = new BufferedReader(isr);
String line = null;
while ( (line = br.readLine()) != null)
{
System.out.println(line);
}
Any help would be greatly appreciated!!
Thank you,
rana.