reading html from an inputstream java
Posted
by
randeel wimalagunarathne
on Stack Overflow
See other posts from Stack Overflow
or by randeel wimalagunarathne
Published on 2010-12-22T05:35:37Z
Indexed on
2010/12/22
5:54 UTC
Read the original article
Hit count: 235
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.
© Stack Overflow or respective owner