activemq-cpp开发手册

6.4.2 接口

6.4.2.1 virtual cms::BytesMessage::~BytesMessage() [inline,

virtual]

6.4.2.2 virtual void cms::BytesMessage::setBodyBytes(const

unsigned char * buffer,std::size_t numBytes) throw(CMSException) [pure virtual]

sets the bytes given to the message body. Parameters: Byte Buffer to copy Number of bytes in Buffer to copy Exceptions: CMSException

6.4.2.3 virtual const unsigned

const

char* [pure

cms::BytesMessage::getBodyBytes() virtual]

Gets the bytes that are contained in this message, user should copy this data into a user allocated buffer.

Call getBodyLength to determine the number of bytes to expect. Returns:

const pointer to a byte buffer

6.4.2.4 virtual std::size_t cms::BytesMessage::getBodyLength()

const [pure virtual]

Returns the number of bytes contained in the body of this message. Returns:

number of bytes.

6.4.2.5 virtual void cms::BytesMessage::reset()

throw(cms::CMSException) [pure virtual]

Puts the message body in read-only mode and repositions the stream of bytes to the beginning. Exceptions: CMSException

6.4.2.6 virtual bool cms::BytesMessage::readBoolean()

throw(cms::CMSException) [pure virtual]

Reads a Boolean from the Bytes message stream. Returns:

boolean value from stream Exceptions: CMSException

6.4.2.7 virtual void cms::BytesMessage::writeBoolean(bool

value) throw(cms::CMSException) [pure virtual]

Writes a boolean to the bytes message stream as a 1-byte value.

The value true is written as the value(byte) 1; the value false is written as the value(byte) 0. Parameters: value - boolean to write to the stream Exceptions: CMSException

6.4.2.8 virtual unsigned char cms::BytesMessage::readByte()

throw(cms::CMSException) [pure virtual]

Reads a Byte from the Bytes message stream. Returns:

unsigned char value from stream Exceptions: CMSException

virtual void cms::BytesMessage::writeByte(unsigned char

联系客服:779662525#qq.com(#替换为@)