DMG Forums | File Input/Output
DMG Forums >> 4th Semester >> CSEN 401 - Computer Programming Lab >> File Input/Output
File Input/Output
Author Topic
amira.zaki@guc.edu.eg

GUC Faculty

Join Date: 9/9/2009
Posts: 8

Posted: 2/27/2010 9:15:17 AM

In Java, reading and writing to files can be done in several ways...

Share with us your discoveries...

ahmed.abdel-wahab@student.guc.edu.eg

Student

Join Date: 10/14/2008
Posts: 4

Posted: 2/27/2010 8:13:55 PM

simple tutorial on how to read from file sing random access file

The size of the file is (4.22 KB)

Different mirrors :

1) http://www.multiupload.com/H0CH0PKSI1

2)http://www.mediafire.com/file/m02hzwogjzx/How_to_read_from_file.html
mark.bastawrous@student.guc.edu.eg

Student

Join Date: 10/28/2008
Posts: 1

Posted: 2/27/2010 8:16:49 PM

we create FileInputStream object to read from the user and FileOutputStream object
amira.zaki@guc.edu.eg

GUC Faculty

Join Date: 9/9/2009
Posts: 8

Posted: 2/27/2010 9:10:30 PM

The Scanner class is also a good option.

http://ahchiev.com/summaries/summary-scanner.html
ahmed.abdel-wahab@student.guc.edu.eg

Student

Join Date: 10/14/2008
Posts: 4

Posted: 2/27/2010 10:28:44 PM

@mark.bastawrous :

FileInputStream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader.
For more about file reader >> http://java.sun.com/javase/6/docs/api/java/io/FileReader.html

RenewSession