0

I am new to Java ,I have a tab delimited text file , and I would like to scan each 5 minutes if there were new lines added in the file. The new lines I would like to insert in an ArrayList , any hints ? thanks in advice !

Petrica
  • 37
  • 2
  • 10

1 Answers1

1

For this I guess you need to use Apache Camel.As using camel only for this purpose is not justice as it is a integration pattern but you can use it as it will make your work easy.Define a route and it will make the WATCH OF LOOKING FILE after every 5 mins.
Otherwise you need to write your own threads or work with Timer.You can find a good example of using timer here.

Community
  • 1
  • 1
Freak
  • 6,786
  • 5
  • 36
  • 54