Unlike the other Gray stream functions, close
is not specialized
on t
for stream. This decision has been taken mainly for
the compatibility reasons with some libraries.
This is used to implement file-position
. When position
is not provided it should return the current file position of the
stream as non-negative integer or nil
if the file position
cannot be determined. When position
is supplied the file
position of the stream should be set to that value. If setting the
position is successful then t
should be returned, otherwise
nil
should be returned. The default method always returns
nil
.
This is used to implement file-length
. It returns either a
non-negative integer or nil
if the concept of file length is
not meaningful for the stream. The default method will signal a
type-error
with an expected type of file-stream
. This is
required to conform with the “Exceptional Situations” section of
file-length
in the ANSI specification.
This is used to implement interactive-stream-p
. It returns a
boolean indicating if the stream is interactive. The default method
always returns nil
.
Allows the default line length to be specified for the stream. It
returns either a non-negative integer or nil
if the concept of
line length is not meaningful for the stream. This value is only used
if *print-right-margin*
is nil
. The line length is used
by the pretty printer and by the format justification directive. The
default method returns nil
.
This is used to implement read-sequence
. It should follow the
semantics in the ANSI specification. It returns the position of the
first element in the sequence that was not updated. The default method
calls stream-read-char
or stream-read-byte
repeatedly
based on the type returned by stream-element-type
. Element
access to the sequence is done via elt
.
This is used to implement write-sequence
. It should follow the
semantics in the ANSI specification. It returns sequence without
modification. The default method calls stream-write-char
or
stream-write-byte
repeatedly based on the type returned by
stream-element-type
. Element access to the sequence is done via
elt
.