Asynchronously writes data to the stream, delivering AsyncStreamWriteEvents to the EventHandlers on errors, or on completion of the writing. If partial? is true, events are delivered whenever progress is made in writing data.
data: The Array of objects that is to be sent.
start: Objects are written from a, starting with the slot designated by this keyword parameter. Default is 0.
n: The maximum number of objects to write, default is a.size - start.
max-chunk-size: Is the maximum amount of data to write to the stream in a single operation. But the asynchronous write will continue after that amount is written if there is more data to be written.
partial?: keyword
bool that indicates if any
AsyncStreamWriteEvents should be sent before
n items have been written or a failure occurs.
Introduced in:
version 6.0
Close Stream, should make stream un-usable and make sure that Stream-of.open? return false once this has been called.
Notes
Overriding
Write an Array of items to an OutputStream-of.
data: The Array of objects that is to be sent.
start: Objects are written from a, starting with the slot designated by this keyword parameter. Default is 0.
n: The maximum number of objects to write, default is a.size - start.
allow-short-write?: can the call write less than n or the whole array worth of data? Default is false. Not supported by most streams, and will not error or exception if not supported. Use this for situations like networking.
non-blocking?: should the call be done non-blocking, i.e. should it return immediately having written no data if there is no data immediately available. Default is false. If this is true, allow-short-write? is implied to be true.
Returns
Amount of data written, always n unless allow-short-write? or non-blocking? are true, in which case it will be as much data as could be written immediately, but at least 1 if only allow-short-write? is true.
Write an item to an OutputStream-of.
Notes
It is an error to call this when the stream is not open. Subclasses must implement this.
Overriding
Must be provided by non-abstract subclasses. Implementers should probably include code like:
{if not self.open? then
{throw {new IOException, {format "%s not open", self}}}
}
at the top of their implementations of this method.