WDD_lec_08 - Web Design & Development Lecture 8 Streams Why...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 8
Background image of page 1

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

View Full DocumentRight Arrow Icon
Streams
Background image of page 2
Why Streams?
Background image of page 3

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

View Full DocumentRight Arrow Icon
Node Streams Node Stream
Background image of page 4
Filter Streams Filter Stream
Background image of page 5

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

View Full DocumentRight Arrow Icon
Filter Streams 10100011 11001100 Byte Stream
Background image of page 6
Filter Streams A H D E Character Streams also known as Reader / Writer
Background image of page 7

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

View Full DocumentRight Arrow Icon
Character vs. Byte Streams A character stream manages 16-bit Unicode characters A byte stream manages 8-bit bytes of raw binary data A program must determine how to interpret and use the bytes in a byte stream Typically they are used to read and write sounds and images The InputStream and OutputStream classes (and their descendants) represent byte streams The Reader and Writer classes (and their descendants) represent character streams
Background image of page 8
Types of Streams InputStream / OutputStream Base class streams with few features read() and write() FileInputStream / FileOutputStream Specifically for connecting to files ByteArrayInputStream / ByteArrayOutputStream Use an in-memory array of bytes for storage! BufferedInputStream / BufferedOutputStream
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/01/2010 for the course CS CS506 taught by Professor mr. umair javed during the Spring '10 term at Virtual University of Pakistan.

Page1 / 22

WDD_lec_08 - Web Design & Development Lecture 8 Streams Why...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online