Class precedence list:
fundamental-stream, standard-object, stream, tthe base class for all
closstreams
Write enough blank space so that the next character will be written at the specified column. Returns true if the operation is successful, or
nilif it is not supported for this stream. This is intended for use by bypprintandformat~T. The default method usesstream-line-columnand repeated calls tostream-write-charwith a #SPACE character; it returnsnilifstream-line-columnreturnsnil.
This is like
cl:clear-input, but for Gray streams, returningnil. The default method does nothing.
This is like
cl:clear-output, but for Gray streams: clear the given outputstream. The default method does nothing.
Attempts to ensure that all output sent to the Stream has reached its destination, and only then returns false. Implements
finish-output. The default method does nothing.
Attempts to force any buffered output to be sent. Implements
force-output. The default method does nothing.
Outputs a new line to the Stream if it is not positioned at the begining of a line. Returns
tif it output a new line, nil otherwise. Used byfresh-line. The default method usesstream-start-line-pandstream-terpri.
Return the column number where the next character will be written, or
nilif that is not meaningful for this stream. The first column on a line is numbered 0. This function is used in the implementation ofpprintand theformat~T directive. For every character output stream class that is defined, a method must be defined for this function, although it is permissible for it to always returnnil.
This is used by
listen. It returns true or false. The default method usesstream-read-char-no-hangandstream-unread-char. Most streams should define their own method since it will usually be trivial and will always be more efficient than the default method.
This is used to implement
peek-char; this corresponds topeek-typeofnil. It returns either a character or:eof. The default method callsstream-read-charandstream-unread-char.
Used by
read-byte; returns either an integer, or the symbol:eofif the stream is at end-of-file.
This is used to implement
read-char-no-hang. It returns either a character, ornilif no input is currently available, or:eofif end-of-file is reached. The default method provided byfundamental-character-input-streamsimply callsstream-read-char; this is sufficient for file streams, but interactive streams should define their own method.
Read one character from the stream. Return either a character object, or the symbol
:eofif the stream is at end-of-file. Every subclass offundamental-character-input-streammust define a method for this function.
This is used by
read-line. A string is returned as the first value. The second value is true if the string was terminated by end-of-file instead of the end of a line. The default method uses repeated calls tostream-read-char.
Is
streamknown to be positioned at the beginning of a line? It is permissible for an implementation to always returnnil. This is used in the implementation offresh-line. Note that while a value of 0 fromstream-line-columnalso indicates the beginning of a line, there are cases wherestream-start-line-pcan be meaningfully implemented althoughstream-line-columncan't be. For example, for a window using variable-width characters, the column number isn't very meaningful, but the beginning of the line does have a clear meaning. The default method forstream-start-line-pon classfundamental-character-output-streamusesstream-line-column, so if that is defined to returnnil, then a method should be provided for eitherstream-start-line-porstream-fresh-line.
Writes an end of line, as for
terpri. Returnsnil. The default method does (STREAM-WRITE-CHAR stream #NEWLINE).
Un-do the last call to
stream-read-char, as inunread-char. Returnnil. Every subclass offundamental-character-input-streammust define a method for this function.
Implements
write-byte; writes the integer to the stream and returns the integer as the result.
Write
charactertostreamand returncharacter. Every subclass offundamental-character-output-streammust have a method defined for this function.
This is used by
write-string. It writes the string to the stream, optionally delimited by start and end, which default to 0 andnil. The string argument is returned. The default method provided byfundamental-character-output-streamuses repeated calls tostream-write-char.