Next Previous Up Top Contents Index

5.11 The STREAMS module

<buffer>

Sealed instantiable class

Summary

A subclass of <vector> whose element-type is <byte>.

Superclasses

<vector>

Init-keywords

size:
An instance of <integer> specifying the size of the buffer. Default value: 0.

next:
An instance of <integer>. For an input buffer, this is where the next input byte can be found. For an output buffer, this is where the next output byte should be written to. Default value: 0.

end:
An instance of <integer>. The value of this is one more than the last valid index in a buffer. For an input buffer, this represents the number of bytes read.

Library

io

Module

streams

Description

A subclass of <vector> whose element-type is <byte>.

Instances of <buffer> contain a data vector and two indices: the inclusive start and the exclusive end of valid data in the buffer. The accessors for these indexes are called buffer-next and buffer-end.

Note that size: is not taken as a suggestion of the size the user would like, as with the value passed with buffer-size: to make on <buffered-stream>; if you supply a value with the size: init-keyword, that size is allocated, or, if that is not possible, an error is signalled, as with making any vector.


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index