const DEFAULT_BUFFER_SIZE = 8192;
static int default_buffer_size;
void load MutableArray arguments;
MutableByteArray buffer;
int num;
buffer.
int next;
id init Stream s;
s
with a buffer sized the default_buffer_size.
id
init Stream s
bufferSize int cap;
s with a buffer sized cap.
int peek;
read, or -1
upon an error or end-of-file. This does not actually read the byte.
void unget byte b;
b back (sort-of) into the stream. It will be the
next byte to be read.
OutputStream methodsid flushOutput;
void write byte b;
b, raising a stream-error on error.
int write byte b;
b, returning 1 upon success.
int
writeBytes int length
from pointer address;
length bytes residing in memory at
address.
InputStream methodsbyte read;
stream-eos upon an error or
end-of-file.
int read;
int (num_read)
readRange (int, int) (start, length)
into MutableByteArray destination;
length bytes into the destination, writing them
from start. Return the number of bytes actually read.
protected int readBuffer;
stream. Return the
number of bytes read.
protected int writeBuffer;
stream. Return the
number of bytes written.