Next Previous Up Top Contents Index

5 The Streams Module

5.5 Stream classes

The exported streams class heterarchy includes the classes shown in Figure 5.1. Classes shown in bold are all instantiable.

Figure 5.1 Streams module classes.

<stream>

Open abstract class

The superclass of all stream classes and a direct subclass of <object>.
<positionable-stream>

Open abstract class

A subclass of <stream> supporting the Positionable Stream Protocol.
<buffered-stream>

Open abstract class

A subclass of <stream> supporting the Stream Extension Protocol and the Buffer Access Protocol.
Buffered streams support the buffer-size: init-keyword, which can be used to suggest the size of the stream's buffer. However, the instantiated stream might not use this value: it is taken purely as a suggested value.
<file-stream>

Open abstract instantiable class

The class of single-buffered streams over disk files. The class supports several init-keywords: locator:, direction:, if-exists:, and if-does-not-exist:.
When you instantiate this class, an indirect instance of it is created. The file being streamed over is opened immediately upon creating the stream.
<sequence-stream>

Open class

The class of streams over sequences. The class supports several init-keywords: contents:, direction:, start:, and end:.
This class can be used for streaming over all sequences, but there are also subclasses that are specialized for streaming over strings: see <string-stream>, page 102, <byte-string-stream>, page 63, and <unicode-string-stream>, page 105 for full details.
5.5.1 - Creating streams
5.5.2 - Closing streams
5.5.3 - Locking streams

System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index