A number of classes and functions are provided in the stream
package that allow you to define your own input and output streams. You can use the standard Common Lisp I/O functions on these streams, and you can add methods specialized on your stream classes to provide specific implementations of other I/O functions. Note that some changes have been made to the standard I/O functions to allow for this. For example, stream-element-type is now a generic function. See The COMMON-LISP Package for alterations to Common Lisp functions, and The STREAM Package for more details on the API for user defined streams.
LispWorks User Guide and Reference Manual - 13 Feb 2015