The Artima Developer Community
Sponsored Link

Java Answers Forum
Java.io

1 reply on 1 page. Most recent reply: Nov 15, 2005 2:13 AM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Sean Ryan

Posts: 1
Nickname: ryano19
Registered: Nov, 2005

Java.io Posted: Nov 10, 2005 12:41 PM
Reply to this message Reply
Advertisement
Can anyone tell is there a way of reading from a file that is being processed by another program.

This program saves its information to a .txt file and I want to be able to access it while the program is writing to this text file.

I want to be able to get this text for my only application.

Any help will be much appreciated.

Thanks.

Sean


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: Java.io Posted: Nov 15, 2005 2:13 AM
Reply to this message Reply
If the other program really writes into this file and does not just write into a buffer and only writes to the file when closing it, there should be no problem at all.
It definitively won't work if the other program writes to a buffer.

If you want to get the changes in real-time, that's another story. Then you have to create for example a timer wich checks the time the file was modified last. If this time is different then the last time you checked re-read the whole file and check for differences.

Flat View: This topic has 1 reply on 1 page
Topic: A question about EJB 2.1 timeouts Previous Topic   Next Topic Topic: InitialContext.lookup() Problem

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use