aspose file tools*
The moose likes Beginning Java and the fly likes difference between contents of view source of a web page and url stream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "difference between contents of view source of a web page and url stream" Watch "difference between contents of view source of a web page and url stream" New topic
Author

difference between contents of view source of a web page and url stream

nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Hi,

I am trying to fetch the contents of a web page programmatically by using java.net.URL class. After opening the stream for the url, I am able to read the contents. I am of the opinion that this content should exactly be same as the contents of the page source.

Am I wrong? If yes, then what are the differences between those two contents?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14352
    
  22

You are not wrong.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Jesper de Jong wrote:You are not wrong.


Then why are the contents not equal?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

Making us guess what the differences are isn't going to get you much help.



[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Bear Bibeault wrote:Making us guess what the differences are isn't going to get you much help.


lol...
Right!!!

Shall I paste both the contents?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

How about just pointing out the significant differences?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: difference between contents of view source of a web page and url stream