WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

cpiBufferSize

This function gets the size of the buffer that contains the bit stream representation of the input message, for the specified parser object.

Syntax

CciSize cpiBufferSize(
  int*        returnCode,
  CciParser*  parser);

Parameters

returnCode
Receives the return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_PARSER_OBJECT
  • CCI_NO_BUFFER_EXISTS
parser
Specifies the address of the parser object (input).

Return values

If successful, the size of the buffer, in bytes, is returned. If an error occurs, zero (CCI_NULL_ADDR) is returned, and returnCode indicates the reason for the error.

Sample

This example is taken from the sample node file BipSampPluginParser.c:

int cpiParseBufferEncoded(
  CciParser*  parser,


  CciContext* context,
  int         encoding,
  int         ccsid
){
  PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
  int                rc;

  /* Get a pointer to the message buffer and set the offset */
  pc->iBuffer = (void *)cpiBufferPointer(&rc, parser);
  pc->iIndex = 0;

  /* Save the format of the buffer */
  pc->iEncoding = encoding;
  pc->iCcsid = ccsid;

  /* Save size of the buffer */
  pc->iSize = cpiBufferSize(&rc, parser);
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:47:31


Reference topicReference topic | Version 8.0.0.7 | as08290_