General generic functions defined on streams
(STREAM-ELEMENT-TYPE
stream
)
Returns the stream's element type, normally a
subtype of CHARACTER
or INTEGER
.
The method for GRAY:FUNDAMENTAL-CHARACTER-STREAM
returns CHARACTER
.
((SETF
STREAM-ELEMENT-TYPE
)
new-element-type
stream
)
Changes the stream's element type.
The default method SIGNAL
s an ERROR
.
This function is a CLISP extension (see Section 21.8, “Function STREAM-ELEMENT-TYPE
”).
(CLOSE
stream
&KEY
:ABORT
)
Closes the stream and flushes any associated buffers.
When you define a primary method on this
function, do not forget to CALL-NEXT-METHOD
.
(OPEN-STREAM-P
stream
)
Returns true before the stream has been closed, and
NIL
after the stream has been closed.
You do not need to add methods to this function.
(GRAY:STREAM-POSITION
stream
position
)
Just like FILE-POSITION
, but NIL
position
means inquire.
You must define a method for this function.
(GRAY:STREAM-READ-SEQUENCE
sequence
stream
&KEY
:START
:END
)
Used by READ-SEQUENCE
. Deprecated.
Define GRAY:STREAM-READ-CHAR-SEQUENCE
or GRAY:STREAM-READ-BYTE-SEQUENCE
and call EXT:READ-CHAR-SEQUENCE
/EXT:READ-BYTE-SEQUENCE
instead.
The default method calls GRAY:STREAM-READ-CHAR-SEQUENCE
or GRAY:STREAM-READ-BYTE-SEQUENCE
.
(GRAY:STREAM-WRITE-SEQUENCE
sequence
stream
&KEY
:START
:END
)
Used by WRITE-SEQUENCE
. Deprecated.
Define GRAY:STREAM-WRITE-CHAR-SEQUENCE
or GRAY:STREAM-WRITE-BYTE-SEQUENCE
and call EXT:WRITE-CHAR-SEQUENCE
/EXT:WRITE-BYTE-SEQUENCE
instead.
The default method calls GRAY:STREAM-WRITE-CHAR-SEQUENCE
or GRAY:STREAM-WRITE-BYTE-SEQUENCE
.
These notes document CLISP version 2.49 | Last modified: 2010-07-07 |