open an existing file

Discussion in 'Java' started by Regina, Nov 17, 2005.

  1. Regina

    Regina Guest

    How I can open an existing file?
    Thank you.
     
    Regina, Nov 17, 2005
    #1
    1. Advertisements

  2. Regina

    Guest

    File file = new File(filePathName);
    FileInputStream inStream = new FileInputStream(file);
     
    , Nov 17, 2005
    #2
    1. Advertisements

  3. Regina

    Regina Guest

    Thank you.
    How can I write on append mode, now?
     
    Regina, Nov 17, 2005
    #3
  4. Regina

    Roedy Green Guest

    On 17 Nov 2005 06:59:23 -0800, "Regina" <>
    wrote, quoted or indirectly quoted someone who said :

    >How I can open an existing file?
    >Thank you.


    see http://mindprod.com/applets/fileio.html
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 17, 2005
    #4
  5. Regina

    Roedy Green Guest

    On 17 Nov 2005 07:49:24 -0800, "Regina" <>
    wrote, quoted or indirectly quoted someone who said :

    >Thank you.
    >How can I write on append mode, now?


    see http://mindprod.com/applets//fileio.html

    That link will answer almost any conceivable question about the i/o
    classes by generating you code. It handles everything but nio.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 17, 2005
    #5
  6. Regina

    Guest

    File outputFile = new File(filePath);
    FileOutputStream outStream = new FileOutputStream(ouputFile, true);
     
    , Nov 17, 2005
    #6
  7. Regina

    Regina Guest

    Thank you everyone!
     
    Regina, Nov 18, 2005
    #7
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Buchan
    Replies:
    5
    Views:
    723
    Alvin Bruney
    Jul 9, 2003
  2. nrm
    Replies:
    3
    Views:
    766
  3. Alvaro Puente

    Get path from FILE* of existing file

    Alvaro Puente, Jul 7, 2003, in forum: C Programming
    Replies:
    5
    Views:
    616
    Chris Dollin
    Jul 9, 2003
  4. Schüle Daniel

    File::open and File.open

    Schüle Daniel, Oct 23, 2006, in forum: Ruby
    Replies:
    4
    Views:
    463
    Rick DeNatale
    Oct 24, 2006
  5. Replies:
    0
    Views:
    358
  6. Replies:
    0
    Views:
    177
  7. Rudra Banerjee

    open an existing file in buffer and write on it

    Rudra Banerjee, Jan 25, 2013, in forum: C Programming
    Replies:
    8
    Views:
    449
    Ben Bacarisse
    Jan 25, 2013
  8. zoom
    Replies:
    6
    Views:
    219
    Mark Lawrence
    Mar 12, 2014
Loading...