Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4028552

java.io.RandomAccessFile: Add flush() and sync() methods

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 1.0.2, 1.2.2
    • core-libs
    • generic, unknown
    • generic

      mei.chan@Corp 1997-01-28
      When does the data written to a RandomAccessFile
      actually get written to disk? There is no flush()
      or sync() method so when can I be sure that my data
      is actually on the disk? Without these calls, both possible answers are unsatifactory. If it is whenever Java feels like it, I have an integrity problem.



      Name: rlT66838 Date: 03/07/2000


      java version "1.2.1"
      HotSpot VM (1.0fcs, mixed mode, build E)

      The class RandomAccessFile allows for random access (i.e., non-stream) to a
      file. Using the getFD() method, you can invoke the sync() method. However,
      there is no flush() method on RandomAccessFile. Sure would be nice to be able
      to flush data out of all buffers after writing data.
      (Review ID: 102172)
      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            mchansunw Mei Chan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: