Class Reference
%Net.ChunkedWriter
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [USER] >  [%Net] >  [ChunkedWriter]
Private  Storage

abstract stream class %Net.ChunkedWriter extends %AbstractStream

%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.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 6


Summary

Properties
%Location AtEnd Attributes Id LastModified
LineTerminator Size TranslateTable

Methods
%%OIDGet %AddToSaveSet %CheckUnique %ClassIsLatestVersion
%ClassName %ConstructClone %Delete %DeleteExtent
%DeleteId %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Exists %ExistsId %Extends %GetParameter
%GetSwizzleObject %Id %IsA %IsModified
%KillExtent %LocationSet %LockStream %New
%NormalizeObject %ObjectModified %Oid %Open
%OpenId %OriginalNamespace %PackageName %ReleaseLock
%Reload %RemoveFromSaveSet %RollBack %Save
%SerializeObject %SetModified %UnlockStream %ValidateObject
Clear CopyFrom CopyFromAndSave DeleteAttribute
DeleteStream FindAt Flush GetAttribute
GetStreamId InputFromDevice IsCharacter IsDefinedAttribute
IsNull LastModifiedGet LineTerminatorSet MoveTo
MoveToEnd NextAttribute OpenStream OutputStream
OutputToDevice OutputToDeviceAt Read ReadLine
ReadLineIntoStream ReadSQL Rewind SaveStream
SerializeToSyncSet SetAttribute SizeGet StreamOIDIsNull
SyncStreamIn Write WriteChunk WriteFirstChunk
WriteLastChunk WriteLine WriteSingleChunk

Subclasses
%SOAP.Binary

Properties

• property TranslateTable as %String [ InitialExpression = "RAW" ];
Translate table to be used for outputting the buffer.

Methods

• method OutputStream()
Abstract method to be overridden by subclass to do the chunked output using the utility functions defined by this abstract super class.
• method WriteChunk(buffer As %String)
Write a chunk.
• method WriteFirstChunk(buffer As %String)
Write the Transfer-Encoding: chunked header followed by the first chunk,
• method WriteLastChunk(buffer As %String)
Write the last chunk followed by a zero length chunk to mark the end.
• method WriteSingleChunk(buffer As %String)
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.