We know that the stream will read from a file using file-stream
functionality and that the stream element type will be simple-char
. The following defines a method on stream-element-type
to return the correct element type.
(defmethod stream-element-type ((stream unicode-ls-stream))
'simple-char)
stream-element-type stream
The function stream-element-type
is implemented as a generic function. Depending on the stream, a method should be defined for this generic function that takes a stream as its argument and returns the element type of the stream.