Relationship to the Streams Package
The Streams package starts with byte streams or character streams, and then moves up to data streams. Object streams are the next level in the hierarchy above data streams. Many of these streams can be chained together to provide independent control at multiple levels of abstraction. Chaining is key to the Streams package architecture (see Streams Package Architecture.)
Object streams follow the same pattern as the classes in the Streams package: the object streams interface is defined by a pair of handle classes, RWObjectOutputStream and RWObjectInputStream. Concrete implementation classes are derived from RWObjectOutputStreamImp and RWObjectInputStreamImp. These classes, in turn, are derived from RWFilteredDataOutputStreamImp and RWFilteredDataInputStreamImp, which allow object streams to be chained to data streams. Object streams also inherit all the primitive type operators from data streams.
Although the classes RWObjectOutputStream and RWObjectInputStream are part of the Serialization package, they are actually part of the Streams package architecture, as shown in Figure 21 and Figure 22. The relationship between the object streams and the Streams package is the same as the relationship between Java object streams and Java data streams.
Figure 21 – Object output streams as part of the Streams package architecture
Serialization class names are in bold type. The other classes are from the Streams package.
Figure 22 – Object input streams as part of the Streams package architecture
Serialization class names are in bold type. The other classes are from the Streams package.