NextPrevUpTopContentsIndex

stream-fill-buffer

Generic Function
Summary

Fills the stream buffer.

Package

stream

Signature

stream-fill-buffer stream => result

Arguments

stream

An input stream.

Values

result

A generalized boolean.

Description

The generic function stream-fill-buffer is called by the reading functions to fill an empty stream buffer from the underlying data source.

stream should be an instance of a subclass of buffered-stream.

stream-fill-buffer should should block until some data is available or return false at end of file. If data is available, it should place it in a buffer, set the stream's input buffer, index and limit appropriately and return a true value. The existing stream buffer can be reused if desired but the index and limit must be updated. The buffer must be of type simple-string , whose element type matches that given when the stream was constructed.

There is a built-in method specialized on buffered-stream which usually suffices. It calls stream-read-buffer with the whole buffer and returns false if this call returns 0. If not, the input index is set to 0 and the input limit is set to the value returned by stream-read-buffer.

See also

buffered-stream
stream-read-buffer


LispWorks Reference Manual - 23 Jul 2004

NextPrevUpTopContentsIndex