State supers: StreamStream, InputOutputStream, Conditions
The default value of the default size for the buffers of our instances.
The default size for the buffers of our instances. If anyone sets this to a negative number, s/he should be ni'd.
void load MutableArray arguments;
The buffer we use.
The number of elements in the buffer.
The index of the first character not yet handled (i.e. read or written).
id init Stream s;
Initialize the newly allocated instance to buffer the stream s with a buffer sized the default_buffer_size.
id init Stream s bufferSize int cap;
Designated initializer. Initialize the newly allocated instance to buffer the stream s with a buffer sized cap.
Return the value of the next byte to be returned by read, or -1 upon an error or end-of-file. This does not actually read the byte.
void unget byte b;
Stuff the byte b back (sort-of) into the stream. It will be the next byte to be read.
Flush any bytes buffered to the stream this instance is buffering.
void write byte b;
Write the byte b, raising a stream-error on error.
int write byte b;
Write the byte b, returning 1 upon success.
int writeBytes int length from pointer address;
Write to this stream the length bytes residing in memory at address.
Return the next byte, raising a stream-eos upon an error or end-of-file.
Return the value of the next byte read, or -1 upon an error or end-of-file.
int (num_read) readRange (int, int) (start, length) into MutableByteArray destination;
Read at most length bytes into the destination, writing them from start. Return the number of bytes actually read.
protected int readBuffer;
Fill the buffer by reading more bytes from the stream. Return the number of bytes read.
protected int writeBuffer;
Write any bytes needing to be output to the stream. Return the number of bytes written.