Results 1 to 2 of 2

Thread: JAva Filewriter

  1. #1
    tommyyyy is offline Member
    Join Date
    Mar 2009
    Posts
    10
    Rep Power
    0

    Default JAva Filewriter

    hi all, does anybody know how to write (overwrite) a specific line in the file

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Read the file, writing it out to a temp file, replacing the line you want to replace, then delete the original and rename the temp file back to the original name.

Similar Threads

  1. scanner vs. BufferedReader? printstream vs. FileWriter?
    By diggitydoggz in forum New To Java
    Replies: 1
    Last Post: 01-09-2009, 01:58 AM
  2. New line or Carriage Return through FileWriter
    By johnt in forum New To Java
    Replies: 2
    Last Post: 05-20-2007, 09:13 PM

Posting Permissions

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