Public Member Functions | |
virtual | ~BytesMessage () |
virtual void | setBodyBytes (const unsigned char *buffer, std::size_t numBytes)=0 throw ( CMSException ) |
virtual const unsigned char * | getBodyBytes () const=0 |
virtual std::size_t | getBodyLength () const=0 |
virtual void | reset ()=0 throw ( cms::CMSException ) |
virtual bool | readBoolean ()=0 throw ( cms::CMSException ) |
virtual void | writeBoolean (bool value)=0 throw ( cms::CMSException ) |
virtual unsigned char | readByte ()=0 throw ( cms::CMSException ) |
virtual void | writeByte (unsigned char value)=0 throw ( cms::CMSException ) |
virtual std::size_t | readBytes (std::vector< unsigned char > &value)=0 throw ( cms::CMSException ) |
virtual void | writeBytes (const std::vector< unsigned char > &value)=0 throw ( cms::CMSException ) |
virtual std::size_t | readBytes (unsigned char *&buffer, std::size_t length)=0 throw ( cms::CMSException ) |
virtual void | writeBytes (const unsigned char *value, std::size_t offset, std::size_t length)=0 throw ( cms::CMSException ) |
virtual char | readChar ()=0 throw ( cms::CMSException ) |
virtual void | writeChar (char value)=0 throw ( cms::CMSException ) |
virtual float | readFloat ()=0 throw ( cms::CMSException ) |
virtual void | writeFloat (float value)=0 throw ( cms::CMSException ) |
virtual double | readDouble ()=0 throw ( cms::CMSException ) |
virtual void | writeDouble (double value)=0 throw ( cms::CMSException ) |
virtual short | readShort ()=0 throw ( cms::CMSException ) |
virtual void | writeShort (short value)=0 throw ( cms::CMSException ) |
virtual unsigned short | readUnsignedShort ()=0 throw ( cms::CMSException ) |
virtual void | writeUnsignedShort (unsigned short value)=0 throw ( cms::CMSException ) |
virtual int | readInt ()=0 throw ( cms::CMSException ) |
virtual void | writeInt (int value)=0 throw ( cms::CMSException ) |
virtual long long | readLong ()=0 throw ( cms::CMSException ) |
virtual void | writeLong (long long value)=0 throw ( cms::CMSException ) |
virtual std::string | readString ()=0 throw ( cms::CMSException ) |
virtual void | writeString (const std::string &value)=0 throw ( cms::CMSException ) |
virtual std::string | readUTF ()=0 throw ( cms::CMSException ) |
virtual void | writeUTF (const std::string &value)=0 throw ( cms::CMSException ) |
virtual BytesMessage * | clone () const=0 |
virtual cms::BytesMessage::~BytesMessage | ( | ) | [inline, virtual] |
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.
Byte | Buffer to copy | |
Number | of bytes in Buffer to copy |
CMSException |
virtual const unsigned char* cms::BytesMessage::getBodyBytes | ( | ) | const [pure 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.
virtual std::size_t cms::BytesMessage::getBodyLength | ( | ) | const [pure virtual] |
Returns the number of bytes contained in the body of this message.
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.
CMSException |
virtual bool cms::BytesMessage::readBoolean | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a Boolean from the Bytes message stream
CMSException |
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.
value | - boolean to write to the stream |
CMSException |
virtual unsigned char cms::BytesMessage::readByte | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a Byte from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeByte | ( | unsigned char | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a byte to the bytes message stream as a 1-byte value
value | - byte to write to the stream |
CMSException |
virtual std::size_t cms::BytesMessage::readBytes | ( | std::vector< unsigned char > & | value | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a byte array from the bytes message stream.
If the length of vector value is less than the number of bytes remaining to be read from the stream, the vector should be filled. A subsequent call reads the next increment, and so on.
If the number of bytes remaining in the stream is less than the length of vector value, the bytes should be read into the vector. The return value of the total number of bytes read will be less than the length of the vector, indicating that there are no more bytes left to be read from the stream. The next read of the stream returns -1.
value | - buffer to place data in |
CMSException | if an error occurs. |
virtual void cms::BytesMessage::writeBytes | ( | const std::vector< unsigned char > & | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a byte array to the bytes message stream using the vector size as the number of bytes to write.
value | - bytes to write to the stream |
CMSException |
virtual std::size_t cms::BytesMessage::readBytes | ( | unsigned char *& | buffer, | |
std::size_t | length | |||
) | throw ( cms::CMSException ) [pure virtual] |
Reads a portion of the bytes message stream.
If the length of array value is less than the number of bytes remaining to be read from the stream, the array should be filled. A subsequent call reads the next increment, and so on.
If the number of bytes remaining in the stream is less than the length of array value, the bytes should be read into the array. The return value of the total number of bytes read will be less than the length of the array, indicating that there are no more bytes left to be read from the stream. The next read of the stream returns -1.
If length is negative, or length is greater than the length of the array value, then an IndexOutOfBoundsException is thrown. No bytes will be read from the stream for this exception case.
value | - the buffer into which the data is read | |
length | - the number of bytes to read; must be less than or equal to value.length |
CMSException |
virtual void cms::BytesMessage::writeBytes | ( | const unsigned char * | value, | |
std::size_t | offset, | |||
std::size_t | length | |||
) | throw ( cms::CMSException ) [pure virtual] |
Writes a portion of a byte array to the bytes message stream. size as the number of bytes to write.
value | - bytes to write to the stream | |
offset | - the initial offset within the byte array | |
length | - the number of bytes to use |
CMSException |
virtual char cms::BytesMessage::readChar | ( | ) | throw ( cms::CMSException ) [pure virtual] |
virtual void cms::BytesMessage::writeChar | ( | char | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a char to the bytes message stream as a 1-byte value
value | - char to write to the stream |
CMSException |
virtual float cms::BytesMessage::readFloat | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a 32 bit float from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeFloat | ( | float | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a float to the bytes message stream as a 4 byte value
value | - float to write to the stream |
CMSException |
virtual double cms::BytesMessage::readDouble | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a 64 bit double from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeDouble | ( | double | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a double to the bytes message stream as a 8 byte value
value | - double to write to the stream |
CMSException |
virtual short cms::BytesMessage::readShort | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a 16 bit signed short from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeShort | ( | short | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a signed short to the bytes message stream as a 2 byte value
value | - signed short to write to the stream |
CMSException |
virtual unsigned short cms::BytesMessage::readUnsignedShort | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a 16 bit unsigned short from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeUnsignedShort | ( | unsigned short | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a unsigned short to the bytes message stream as a 2 byte value
value | - unsigned short to write to the stream |
CMSException |
virtual int cms::BytesMessage::readInt | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a 32 bit signed intger from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeInt | ( | int | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a signed int to the bytes message stream as a 4 byte value
value | - signed int to write to the stream |
CMSException |
virtual long long cms::BytesMessage::readLong | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads a 64 bit long from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeLong | ( | long long | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes a long long to the bytes message stream as a 8 byte value
value | - signed long long to write to the stream |
CMSException |
virtual std::string cms::BytesMessage::readString | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads an ASCII String from the Bytes message stream
CMSException |
virtual void cms::BytesMessage::writeString | ( | const std::string & | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes an ASCII String to the Bytes message stream
value | - String to write to the stream |
CMSException |
virtual std::string cms::BytesMessage::readUTF | ( | ) | throw ( cms::CMSException ) [pure virtual] |
Reads an UTF String from the BytesMessage stream
CMSException |
virtual void cms::BytesMessage::writeUTF | ( | const std::string & | value | ) | throw ( cms::CMSException ) [pure virtual] |
Writes an UTF String to the BytesMessage stream
value | - String to write to the stream |
CMSException |
virtual BytesMessage* cms::BytesMessage::clone | ( | ) | const [pure virtual] |
Clone this message exactly, returns a new instance that the caller is required to delete.
Implements cms::Message.