Groups | Search | Server Info | Login | Register


Groups > comp.lang.java.programmer > #5350

Re: a program process a constantly updated file

From www <xsli2@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Re: a program process a constantly updated file
Date 2011-06-17 10:43 -0700
Organization http://groups.google.com
Message-ID <d3d447d3-eeea-4e55-b4df-928c0f8c5a64@eq2g2000vbb.googlegroups.com> (permalink)
References <885b80e6-864a-4076-b559-65b2452ffe9f@ct4g2000vbb.googlegroups.com>

Show all headers | View raw


Just one more note: the commercial program outputs something to the
log file probably once in a couple hours. It is not very active.

If the log file has been updated, within one minute range, the Java
program needs to read the newly inserted line.

So, my plan right now is for every 60 seconds, let the Java program
check if the log file has been changed. If not, do nothing; If the
file has been changed(within the past 60 seconds, one or several lines
have been added to the bottom of the log file), open and read the log
file, from top to the bottom, retrieve the new lines...

I am just wondering if there is better way to do this.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

a program process a constantly updated file www <xsli2@yahoo.com> - 2011-06-17 10:15 -0700
  Re: a program process a constantly updated file www <xsli2@yahoo.com> - 2011-06-17 10:43 -0700
  Re: a program process a constantly updated file Jeff Higgins <jeff@invalid.invalid> - 2011-06-17 13:51 -0400
    Re: a program process a constantly updated file Jeff Higgins <jeff@invalid.invalid> - 2011-06-17 14:07 -0400
      Re: a program process a constantly updated file www <xsli2@yahoo.com> - 2011-06-18 17:40 -0700
  Re: a program process a constantly updated file Roedy Green <see_website@mindprod.com.invalid> - 2011-06-19 11:12 -0700

csiph-web