Đang chuẩn bị liên kết để tải về tài liệu:
Object-Oriented Programming - Lecture 5: I/O Streams
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Object-Oriented Programming - Lecture 5: I/O Streams presents Byte streams, Character streams, Buffered streams, Scanning and formatting, I/O from the command line, Data streams, Object streams. | Object-Oriented Programming Lecture 5: I/O Streams Dr. Lê H!ng Ph"#ng -- Department of Mathematics, Mechanics and Informatics, VNUH August 2012 1 Thursday, August 2, 12 Content ✦ Byte streams ✦ Character streams ✦ Buffered streams ✦ Scanning and formatting ✦ I/O from the command line ✦ Data streams ✦ Object streams 2 Thursday, August 2, 12 I/O streams ✦ An I/O stream represents an input source and an output destination. ✦ Different kinds of source and destination: ✦ ✦ disk files, devices, other programs, memory arrays. Different kinds of data: ✦ simple bytes, primitive data types, objects. 3 Thursday, August 2, 12 I/O streams ✦ A stream is a sequence of data. ✦ A program uses an input stream to read data from a source, one item at a time. ✦ A program uses an output stream to write data to a destination, one item at a time. 4 Thursday, August 2, 12 Byte streams ✦ Programs use byte streams to perform input and output on 8-bit bytes. ✦ ✦ ✦ There are many byte stream classes. All of them are descended from InputStream and OutputStream. File I/O byte streams: FileInputStream and FileOutputStream. 5 Thursday, August 2, .