Implements the standard behavior as a generic function.
common-lisp
stream-element-type stream => type
stream⇩ |
A stream. |
type |
A type specifier. |
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.
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