Results 1 to 2 of 2
  1. #1
    blumdiggity is offline Member
    Join Date
    Feb 2010
    Rep Power

    Default problems with txt file

    Ok I got a program that reads and writes to a txt file. The problem I am having is that when I write to the file the changes aren't made till the program is stopped.

    Is there a way to update the txt file while running the program so that the changes can be later read by the program.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    its possible the writer is using a buffered output stream.
    you can try to invoke flush() on the output stream at the point before where you wanted to then try to read from the file.

Similar Threads

  1. problems uploading big file in LONGBLOB
    By atom86 in forum JDBC
    Replies: 0
    Last Post: 10-08-2009, 12:47 PM
  2. problems copying a file
    By atom86 in forum Advanced Java
    Replies: 16
    Last Post: 10-01-2009, 02:40 PM
  3. Jar file problems!
    By viper81 in forum Eclipse
    Replies: 3
    Last Post: 12-31-2008, 10:50 AM
  4. Problems with file dir
    By willemjav in forum Java Applets
    Replies: 0
    Last Post: 02-07-2008, 12:08 AM
  5. problems with the name of file
    By bbq in forum Java Servlet
    Replies: 0
    Last Post: 06-28-2007, 04:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts