All Manuals > LispWorks® User Guide and Reference Manual > 33 The COMMON-LISP Package

stream-element-type Generic Function

Summary

Implements the standard behavior as a generic function.

Package

common-lisp

Signature

stream-element-type stream => type

Arguments
stream
A stream.
Values
type
A type specifier.
Description

The generic function stream-element-type implements the standard function. Depending on the stream, a method should be defined for this generic function that returns the element type of the stream.

Methods must be implemented for all subclasses of buffered-stream. Typically for character streams, the implementation can return the array-element-type of the buffer.

There is a method with stream specialized on fundamental-character-stream which returns character. You need to define a method for your stream classes that inherit from fundamental-binary-stream.

There is an example in 24.2.2 Recognizing the stream element type.

See also

stream-element-type in the Common Lisp HyperSpec
buffered-stream
fundamental-binary-stream
fundamental-character-stream


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:30