Textbook Notes (290,000)
CA (170,000)
Ryerson (10,000)
ITM (900)
ITM 200 (20)
Chapter 10

Chapter 10


Department
Information Technology Management
Course Code
ITM 200
Professor
Vikraman Baskaran
Chapter
10

This preview shows page 1. to view the full 4 pages of the document.
Chapter 10 – Files
10.1 Motivation
Reading data from files
File is a collection of information that can be stored on a disk; the disk could be a
oHard disk
oFloppy disk
oZip disk
oCD-ROM
oFlash drive
There are lots of different sorts of file; for example
oWord documents
oExcel spreadsheets
oProgram source files (text)
oExecutable program files
oData files for programs
10.2 Sequential access files
Sequential access file is one in which data is written to the file in sequence, 1 data item at
a time
oThe data is read from the file in the same sequential order
oIn a file of characters, each data item is a single character
10.3 Writing to a file
To write data to a file on a disk you must carry out the following steps
oCreate a FileWriter object in the program to represent the file and link it to the file
oCreate a BufferedWriter object to collect characters together before they are sent
to the file and connect it to the FileWriter object
www.notesolution.com
You're Reading a Preview

Unlock to view full version