cms::BytesMessage Class Reference

Inheritance diagram for cms::BytesMessage:

Inheritance graph
[legend]
Collaboration diagram for cms::BytesMessage:

Collaboration graph
[legend]
List of all members.

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 BytesMessageclone () const=0

Constructor & Destructor Documentation

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


Member Function Documentation

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 

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.

Returns:
const pointer to a byte buffer

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.

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 

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 

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 

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  value  )  throw ( cms::CMSException ) [pure virtual]

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

Parameters:
value - byte to write to the stream
Exceptions:
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.

Parameters:
value - buffer to place data in
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached
Exceptions:
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.

Parameters:
value - bytes to write to the stream
Exceptions:
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.

Parameters:
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
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached
Exceptions:
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.

Parameters:
value - bytes to write to the stream
offset - the initial offset within the byte array
length - the number of bytes to use
Exceptions:
CMSException 

virtual char cms::BytesMessage::readChar (  )  throw ( cms::CMSException ) [pure virtual]

Reads a Char from the Bytes message stream

Returns:
char value from stream
Exceptions:
CMSException 

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

Parameters:
value - char to write to the stream
Exceptions:
CMSException 

virtual float cms::BytesMessage::readFloat (  )  throw ( cms::CMSException ) [pure virtual]

Reads a 32 bit float from the Bytes message stream

Returns:
double value from stream
Exceptions:
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

Parameters:
value - float to write to the stream
Exceptions:
CMSException 

virtual double cms::BytesMessage::readDouble (  )  throw ( cms::CMSException ) [pure virtual]

Reads a 64 bit double from the Bytes message stream

Returns:
double value from stream
Exceptions:
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

Parameters:
value - double to write to the stream
Exceptions:
CMSException 

virtual short cms::BytesMessage::readShort (  )  throw ( cms::CMSException ) [pure virtual]

Reads a 16 bit signed short from the Bytes message stream

Returns:
short value from stream
Exceptions:
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

Parameters:
value - signed short to write to the stream
Exceptions:
CMSException 

virtual unsigned short cms::BytesMessage::readUnsignedShort (  )  throw ( cms::CMSException ) [pure virtual]

Reads a 16 bit unsigned short from the Bytes message stream

Returns:
unsigned short value from stream
Exceptions:
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

Parameters:
value - unsigned short to write to the stream
Exceptions:
CMSException 

virtual int cms::BytesMessage::readInt (  )  throw ( cms::CMSException ) [pure virtual]

Reads a 32 bit signed intger from the Bytes message stream

Returns:
int value from stream
Exceptions:
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

Parameters:
value - signed int to write to the stream
Exceptions:
CMSException 

virtual long long cms::BytesMessage::readLong (  )  throw ( cms::CMSException ) [pure virtual]

Reads a 64 bit long from the Bytes message stream

Returns:
long long value from stream
Exceptions:
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

Parameters:
value - signed long long to write to the stream
Exceptions:
CMSException 

virtual std::string cms::BytesMessage::readString (  )  throw ( cms::CMSException ) [pure virtual]

Reads an ASCII String from the Bytes message stream

Returns:
String from stream
Exceptions:
CMSException 

virtual void cms::BytesMessage::writeString ( const std::string &  value  )  throw ( cms::CMSException ) [pure virtual]

Writes an ASCII String to the Bytes message stream

Parameters:
value - String to write to the stream
Exceptions:
CMSException 

virtual std::string cms::BytesMessage::readUTF (  )  throw ( cms::CMSException ) [pure virtual]

Reads an UTF String from the BytesMessage stream

Returns:
String from stream
Exceptions:
CMSException 

virtual void cms::BytesMessage::writeUTF ( const std::string &  value  )  throw ( cms::CMSException ) [pure virtual]

Writes an UTF String to the BytesMessage stream

Parameters:
value - String to write to the stream
Exceptions:
CMSException 

virtual BytesMessage* cms::BytesMessage::clone (  )  const [pure virtual]

Clone this message exactly, returns a new instance that the caller is required to delete.

Returns:
new copy of this message

Implements cms::Message.


Generated on Fri Jun 1 07:20:16 2007 for CMS by  doxygen 1.5.1-p1