Thread: Java File IO

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    241

    Java File IO

    Does anyone know how to do file input and output in Java?

  2. #2
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Why not ask at a Java forum?

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Why not ask at a Java forum?
    Probably because the question is simple enough that many people here can answer it.

    >Does anyone know how to do file input and output in Java?
    Create an object of the FileInputStream and FileOutputStream classes:
    Code:
    FileInputStream fin = new FileInputStream ( "path" );
    FileOutputStream fout = new FileOutputStream ( "path" );
    Then you have read and write and such to actually do the I/O. Look up those classes on the Sun website for details of what you can do.
    Last edited by Prelude; 03-09-2004 at 01:36 PM.
    My best code is written with the delete key.

  4. #4

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  2. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  3. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  4. File IO with .Net SDK and platform SDK
    By AtomRiot in forum Windows Programming
    Replies: 5
    Last Post: 12-14-2004, 10:18 AM
  5. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM