18#ifndef _CMS_BYTESMESSAGE_H_
19#define _CMS_BYTESMESSAGE_H_
82 virtual void setBodyBytes(
const unsigned char* buffer,
int numBytes) = 0;
190 virtual int readBytes(std::vector<unsigned char>& value)
const = 0;
203 virtual void writeBytes(
const std::vector<unsigned char>& value) = 0;
236 virtual int readBytes(
unsigned char* buffer,
int length)
const = 0;
253 virtual void writeBytes(
const unsigned char* value,
int offset,
int length) = 0;
467 virtual void writeUTF(
const std::string& value) = 0;
A BytesMessage object is used to send a message containing a stream of unsigned bytes.
Definition BytesMessage.h:66
virtual float readFloat() const =0
Reads a 32 bit float from the Bytes message stream.
virtual bool readBoolean() const =0
Reads a Boolean from the Bytes message stream.
virtual double readDouble() const =0
Reads a 64 bit double from the Bytes message stream.
virtual unsigned char * getBodyBytes() const =0
Gets the bytes that are contained in this message and returns them in a newly allocated array that be...
virtual void writeShort(short value)=0
Writes a signed short to the bytes message stream as a 2 byte value.
virtual void writeDouble(double value)=0
Writes a double to the bytes message stream as a 8 byte value.
virtual long long readLong() const =0
Reads a 64 bit long from the Bytes message stream.
virtual int readBytes(unsigned char *buffer, int length) const =0
Reads a portion of the bytes message stream.
virtual void writeUTF(const std::string &value)=0
Writes an UTF String to the BytesMessage stream.
virtual void writeByte(unsigned char value)=0
Writes a byte to the bytes message stream as a 1-byte value.
virtual char readChar() const =0
Reads a Char from the Bytes message stream.
virtual void writeBytes(const unsigned char *value, int offset, int length)=0
Writes a portion of a byte array to the bytes message stream.
virtual unsigned char readByte() const =0
Reads a Byte from the Bytes message stream.
virtual void writeFloat(float value)=0
Writes a float to the bytes message stream as a 4 byte value.
virtual std::string readUTF() const =0
Reads an UTF String from the BytesMessage stream.
virtual void writeChar(char value)=0
Writes a char to the bytes message stream as a 1-byte value.
virtual void writeInt(int value)=0
Writes a signed int to the bytes message stream as a 4 byte value.
virtual int readBytes(std::vector< unsigned char > &value) const =0
Reads a byte array from the bytes message stream.
virtual void reset()=0
Puts the message body in read-only mode and repositions the stream of bytes to the beginning.
virtual void setBodyBytes(const unsigned char *buffer, int numBytes)=0
sets the bytes given to the message body.
virtual void writeUnsignedShort(unsigned short value)=0
Writes a unsigned short to the bytes message stream as a 2 byte value.
virtual unsigned short readUnsignedShort() const =0
Reads a 16 bit unsigned short from the Bytes message stream.
virtual int readInt() const =0
Reads a 32 bit signed integer from the Bytes message stream.
virtual std::string readString() const =0
Reads an ASCII String from the Bytes message stream.
virtual void writeBoolean(bool value)=0
Writes a boolean to the bytes message stream as a 1-byte value.
virtual int getBodyLength() const =0
Returns the number of bytes contained in the body of this message.
virtual short readShort() const =0
Reads a 16 bit signed short from the Bytes message stream.
virtual void writeLong(long long value)=0
Writes a long long to the bytes message stream as a 8 byte value.
virtual void writeString(const std::string &value)=0
Writes an ASCII String to the Bytes message stream.
virtual void writeBytes(const std::vector< unsigned char > &value)=0
Writes a byte array to the bytes message stream using the vector size as the number of bytes to write...
virtual BytesMessage * clone() const =0
Clones this message.
Root of all messages.
Definition Message.h:88
#define CMS_API
Definition Config.h:31
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition DestinationResolver.h:23