stream
stream System Class
Class Precedence List:
stream, t
Description:
A stream is an object that can be used with an input or output function to identify an appropriate source or sink of characters or bytes for that operation.
For more complete information, see Section 21.1 (Stream Concepts).
See Also:
Section 21.1 (Stream Concepts), Section 22.1.3.13 (Printing Other Objects), Chapter 22 (Printer), Chapter 23 (Reader)
Expanded Reference: stream
Overview
stream is the base system class for all stream objects in Common Lisp. All streams -- whether input, output, bidirectional, file, string, broadcast, or otherwise -- are of type stream.
Type Checking
(typep *standard-input* 'stream)
=> T
(typep (make-string-output-stream) 'stream)
=> T
(typep 42 'stream)
=> NIL
Class Hierarchy
All specific stream types are subtypes of stream.
(subtypep 'string-stream 'stream)
=> T
=> T
(subtypep 'file-stream 'stream)
=> T
=> T
(subtypep 'broadcast-stream 'stream)
=> T
=> T
Equivalent to streamp
Testing (typep x 'stream) is equivalent to (streamp x).
(let ((s (make-string-input-stream "test")))
(eql (typep s 'stream) (streamp s)))
=> T