Patent ID: 8782094

Claim:
A processor-implemented method for adding a plurality of individual data items from one or more applications to a complex container by using a package object, the method comprising: creating the package object, the package object comprising: an externally accessible array, comprising of pointer-integer pairs, wherein: each pointer points to the start of a memory location for an individual data item to be written into the complex container, elements of the individual data item occupy contiguous memory locations and the plurality of individual data items occupy mutually discontiguous memory locations, and each pointer is associated with an externally accessible integer that represents the size of the data item referenced by the pointer; an externally accessible size function for providing the cumulative size of the plurality of individual data items; and an externally accessible write function for writing the individual data items in sequence to the complex container, the sequence being determined by the order in which pointers that reference the data item appear in the array; enabling communications between the one or more applications and the package object for adding the plurality of individual data items to the complex container; determining a quantity of memory to hold the plurality of individual data items by invoking the externally accessible size function; and adding the plurality of individual data items to the complex container at locations supplied by an external interface of the complex container by invoking the externally accessible write function, if the memory available to hold the plurality of individual data items is not less than the determined quantity of memory.