Home arrow static arrow Java Programming [Archive] - compare the content of a web page
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - compare the content of a web page
This topic has 1 reply on 1 page.

Posts:14
Registered: 8/3/01
compare the content of a web page  
Jul 1, 2004 5:10 AM



 
Hi,

I m looking to a way to see if the content of a web page has changed since the lastest consultation of this page. I can use a file or a mysql database to store some informations to realise the comparaison.
I was thinking to buffer the content of the url, convert into string and use this string to compare
Any idea to do that ?
Thank's
 

Posts:7,499
Registered: 02-11-14
Re: compare the content of a web page  
Jul 1, 2004 5:23 AM (reply 1 of 1)



 
Look into the URLConnection class: http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLConnection.html

At the very least, it will provide an InputStream to the page that will let you read it in to get the String and compare...

But it prolly has other methods which you could use that may be quicker and more suited to your purpose (like getLastModified or setIfModifiedSince...)
 
This topic has 1 reply on 1 page.