Results 1 to 2 of 2
- 03-31-2011, 04:54 PM #1
Senior Member
- Join Date
- Feb 2011
- Posts
- 107
- Rep Power
- 0
Store links in text file and read into variables
Hie guys, quick question. I am trying implement an automated reader for a few news websites.
The problem is finding a way to know which links have already been visited.
So what I thought of is using a text file that stores all the links that were present on the page during the last program run and using basic string comparison to determine which ones are new.
This would probably make more sense in a loop of some sort, iterating through all the links stored in our text file and comparing the to the links currently on the web page concernedJava Code:if(oldString.equals(newString)){ visit link and do some nice stuff }
After the process is completed the text file would be overwritten with new.
Now my question. How could I go about actually taking a link from a text file and putting it in a variable so I can compare it?
Again is this the best thing to do. I am doing this as part of my coding practice for the summer and am very interest in good design patterns and would be very interested to heart alternatives if my approach is not sound.
-
Similar Threads
-
Store Text-file Into 2D Array
By benn22 in forum New To JavaReplies: 20Last Post: 03-09-2011, 09:17 PM -
Need a solution to read and store data from a file
By sheetalnri in forum New To JavaReplies: 10Last Post: 09-30-2010, 06:43 AM -
How do you read from a file, and then store the info in an array?
By szimme101 in forum New To JavaReplies: 5Last Post: 07-30-2008, 09:30 AM -
How to store 5 numbers from a file into 5 seperate variables?
By kewlgeye in forum New To JavaReplies: 4Last Post: 06-09-2008, 04:44 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks