Sun Java System Web Server 7.0 Update 3 NSAPI Developer's Guide

pblock_pblock2str() Function

The pblock_pblock2str function copies all parameters of a specified pblock into a specified string. The function allocates additional non-heap space for the string if needed.

Use this function to stream the pblock for archival and other purposes.


char *pblock_pblock2str(pblock *pb, char *str);

Return Values

The new version of the str parameter. If str is NULL, this string is a new string; otherwise, this string is a reallocated string. In either case, this string is allocated from the request’s memory pool.


pblock *pb is the pblock to be copied.

char *str is the string into which the pblock is to be copied. This string must have been allocated by MALLOC or REALLOC, not by PERM_MALLOC or PERM_REALLOC, which allocate from the system heap.

Each name-value pair in the string is separated from its neighbor pair by a space, and is in the format name="value."

See Also

pblock_copy() Function, pblock_create() Function, pblock_find() Function, pblock_free() Function, pblock_nvinsert() Function, pblock_remove() Function, pblock_str2pblock() Function