object is used to read editor
information from a file or other input stream (such as the
Reads data from the stream, returning itself.
Reading from a bad stream always gives 0.
The v box is filled with the next integer or floating-point value in the stream.
, but the last
read byte is assumed to be a nul terminator and discarded. Use this
method when data is written by a call to put
without an explicit byte count, and use
when data is
written with an explicit byte count.
The len box is filled with the length of the byte string plus one (to indicate the terminator), unless len is #f.
Returns the next number value in the stream. Despite the
name, this method may return an inexact number, but only if
the next element in the stream was actually written as an
box is filled with a fixed-size integer from the stream obtained through
Gets a fixed-sized integer from the stream. See
for more information.
Reading from a bad stream always gives 0
Returns the next floating-point value in the stream.
Returns the next byte string from the stream. This is
the recommended way to read bytes back in from a stream;
with two arguments
(passing along the length of the bytes) to write out the bytes
to match this method.
Reading from a bad stream returns #f or #"".
Note that when put is not given a byte
length, it includes an extra byte for a nul terminator; use
get-bytes to read such byte strings.
The len box is filled with the length of the byte string, unless len is #f.
Jumps to a given position in the stream.
Returns #t if the stream is ready for reading, #f otherwise.
Reading from a bad stream always returns 0 or "".
Sets a file-reading boundary at n
bytes past the current
stream location. If there is an attempt to read past this boundary,
an error is signaled. The boundary is removed with a call to
. Every call to
must be balanced by a call to
Boundaries help keep a subroutine from reading too much data leading
to confusing errors. However, a malicious subroutine can call
remove-boundary on its own.
Skips past the next n bytes in the stream.
Returns the current stream position.