Results 1 to 3 of 3

Thread: Opening and editing text file in java

  1. #1
    WilsonMartin is offline Senior Member
    Join Date
    Dec 2009
    Posts
    319
    Rep Power
    4

    Default Opening and editing text file in java

    I attach to file and open it with FileWriter class and write it but I want to read file and return variable IP, a line like IP = 182.15 and vary IP. So please tell me how to do this, any help will be appreciated.

  2. #2
    AndersonDiaz is offline Senior Member
    Join Date
    Dec 2009
    Posts
    311
    Rep Power
    4

    Default

    I think rather than FileWriter utilize FileReader. Then use BufferedReader to read file line by line. Then see line to decide if it interests you or not. For more information on API go to sun's official site.

  3. #3
    TaylorRyan is offline Senior Member
    Join Date
    Dec 2009
    Posts
    307
    Rep Power
    4

    Default

    See the code given below which may be helpful for you:

    Code:
    Properties p = new Properties();
    d.load(new FileInputStream ("ton_fichier"));
    / / Mails to take the IP address
    d.getProperty("IP");

Similar Threads

  1. Opening PDF File with Adobe
    By WilsonMartin in forum Software Jargons
    Replies: 1
    Last Post: 03-06-2012, 04:54 PM
  2. Open and write text file in JAVA
    By Davismoore in forum Programming
    Replies: 2
    Last Post: 03-26-2010, 02:50 PM
  3. Reading zip file without opening it
    By JenkinsReed in forum Programming
    Replies: 1
    Last Post: 01-23-2010, 03:08 PM
  4. Editing Text Boxes in Adobe Acrobat 6
    By WalkerCook in forum Software Jargons
    Replies: 0
    Last Post: 01-18-2010, 03:20 PM
  5. Opening PDF File Sent in My Email
    By Davismoore in forum Software Jargons
    Replies: 0
    Last Post: 01-13-2010, 01:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48