Previous: Network streams, Up: Input and output


3.4 CLOS Streams

When the optional CLOS subsystem is available, an interface is provided by ECL for using CLOS objects as Common-Lisp input/output character streams. Such support can be used for instance to build interactive character streams, which may be used by applications as the stream argument for Common-Lisp I/O functions such as read, listen, prin1, etc. The fundamental interface to clos-stream objects consists of (generic) functions which implement the basic Common-Lisp character stream operations (see Common-Lisp, Chapter 22) but whose details are implementation dependent.

The following functions are automatically invoked by ECL when a stream operation involves a CLOS object as a stream parameter. The programmer should define these methods for any class of objects which are to be used for character input/output.