Groups | Search | Server Info | Login | Register


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

Re: a program process a constantly updated file

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder3.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!news.glorb.com!postnews.google.com!eq2g2000vbb.googlegroups.com!not-for-mail
From www <xsli2@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Re: a program process a constantly updated file
Date Fri, 17 Jun 2011 10:43:01 -0700 (PDT)
Organization http://groups.google.com
Lines 13
Message-ID <d3d447d3-eeea-4e55-b4df-928c0f8c5a64@eq2g2000vbb.googlegroups.com> (permalink)
References <885b80e6-864a-4076-b559-65b2452ffe9f@ct4g2000vbb.googlegroups.com>
NNTP-Posting-Host 205.156.36.55
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1308332581 11794 127.0.0.1 (17 Jun 2011 17:43:01 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Fri, 17 Jun 2011 17:43:01 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info eq2g2000vbb.googlegroups.com; posting-host=205.156.36.55; posting-account=oo44OQoAAABMDvaRlaO3SeQ5MVbxqLdH
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-Header-Order HUALESNKRC
X-HTTP-UserAgent Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe)
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5350

Show key headers only | 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