L06-FileIO1 - King Fahd University of Petroleum Minerals...

Info icon This preview shows pages 1–7. Sign up to view the full content.

December 6, 2010 ICS102 Lecture 6: File Input Output King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Outline Text Files Stream Reading from a Text File using  Scanner Writing to a File IOException Pitfalls
Image of page 2
Text Files Files that are designed to be read by human beings, and that  can be read or written with an editor are called  text files Text files can also be called ASCII files because the data they  contain uses an ASCII encoding scheme An advantage of text files is that they are usually the same on  all computers, so that they can move from one computer to  another
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

ASCII Encoding
Image of page 4
Streams stream  is an object that enables the flow of data  between a program and some I/O device or file If the data flows into a program, then the stream is called  an  input stream If the data flows out of a program, then the stream is called  an  output stream file program Output stream Input stream
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Streams
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '08
  • ZAMAN
  • Saudi Arabia, stream, Input/output, King Fahd University of Petroleum and Minerals, Fahd of Saudi Arabia

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern