%Net.ChunkedWriterabstract stream class %Net.ChunkedWriter
%Net.ChunkedWriter provides an interface so that its sub class may be used as an %Net.HttpRequest EntityBody for chunked output from %Net.HttpRequest.
In order to do chunked output from %Net.HttpRequest, a subclass of %Net.ChunkedWriter must be created which implements the OutputStream method. This subclass of %Net.ChunkedWriter is then assigned to the EntityBody property of %Net.HttpRequest which uses the OutputStream method of this class to produce the chunked output.
If the entire request body fits in one buffer, OutputStream is implemented by calling WriteSingleChunk(buffer).
If the entire request is multiple buffers, then WriteFirstChunk(buffer) is called followed by 0 or more calls to WriteChunk(buffer) followed by a call to WriteLastChunk(buffer). WriteLastChunk may be called with the last buffer of output or with the empty string as its argument if no more output is required.
The TranslateTable property may be set to force automatic translation of the chunks as they are written.
Number of characters we send
Translate table to be used for outputting the buffer.
Just return ok
Abstract method to be overridden by subclass to do the chunked output using the utility functions defined by this abstract super class.
Write a chunk.
Write the Transfer-Encoding: chunked header followed by the first chunk,
Write the last chunk followed by a zero length chunk to mark the end.
Write the Content-Length HTTP header followed by the entity body as a single chunk. This is used to output the data as not chunked if its length can be determined.