Specifications

Sun Services
Java™ Programming Language
xiv
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Monitor Model for Synchronization ................................................................................................ 13-28
The Producer Class ............................................................................................................................ 13-29
The Consumer Class ............................................................................................................................ 13-31
The SyncStack Class .......................................................................................................................... 13-33
The pop Method .................................................................................................................................. 13-34
The push Method ................................................................................................................................ 13-35
The SyncTest Class ............................................................................................................................ 13-36
The SyncTest Class ............................................................................................................................ 13-37
Advanced I/O Streams ........................................................................................... 14-1
Objectives ............................................................................................................................................... 14-2
Relevance ................................................................................................................................................ 14-3
I/O Fundamentals ................................................................................................................................ 14-4
Fundamental Stream Classes .............................................................................................................. 14-5
Data Within Streams ............................................................................................................................. 14-6
The InputStream Methods ................................................................................................................. 14-7
The OutputStream Methods ............................................................................................................... 14-8
The Reader Methods ............................................................................................................................ 14-9
The Writer Methods .......................................................................................................................... 14-10
Node Streams ....................................................................................................................................... 14-11
A Simple Example ............................................................................................................................... 14-12
Buffered Streams ................................................................................................................................. 14-14
I/O Stream Chaining .......................................................................................................................... 14-16
Processing Streams ............................................................................................................................. 14-17
The InputStream Class Hierarchy .................................................................................................. 14-19
The OutputStream Class Hierarchy ................................................................................................ 14-20
The Reader Class Hierarchy ............................................................................................................. 14-21
The Writer Class Hierarchy ............................................................................................................. 14-22