Results 1 to 2 of 2
  1. #1
    itaipee is offline Member
    Join Date
    Dec 2008
    Posts
    99
    Rep Power
    0

    Default working with files (text files)

    Hi

    I have text file with many lines, in each line the first field is the key . I need simple method that two argument
    String line , String key
    Find the row with the key and replace the entire row with "line" ( assuming that the first field in the line is the key .. )

    I didnt find how to write in the middle of the file. only how to ovride the file or append in the end of the file.
    ( :mad: Why java cant have simple file system like C )

    Anyone have soemthing similar to what i askeD?







    The text is look like that
    key Field1 Field 2
    ---------------------
    Abe2s Name1 Adress1
    G6440 Name2 Adress2

  2. #2
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

Similar Threads

  1. Comparing Two Text Files
    By coder09 in forum New To Java
    Replies: 15
    Last Post: 03-03-2009, 07:11 AM
  2. Parsing Text Files
    By coder09 in forum New To Java
    Replies: 6
    Last Post: 02-18-2009, 01:08 PM
  3. Can someone help me working with files?
    By Goodwine in forum New To Java
    Replies: 4
    Last Post: 11-18-2008, 05:04 AM
  4. Behaving text files like binary files
    By Farzaneh in forum New To Java
    Replies: 2
    Last Post: 08-27-2008, 04:20 PM
  5. Text and image files within jar files
    By erhart in forum Advanced Java
    Replies: 8
    Last Post: 01-19-2008, 05:43 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
  •