activemq-cpp-3.4.0

decaf::util::zip::Adler32 Class Reference

Clas that can be used to compute an Adler-32 Checksum for a data stream. More...

#include <src/main/decaf/util/zip/Adler32.h>

Inheritance diagram for decaf::util::zip::Adler32:

Public Member Functions

 Adler32 ()
virtual ~Adler32 ()
virtual long long getValue () const
virtual void reset ()
 Reset the checksum to its initial value.
virtual void update (const std::vector< unsigned char > &buffer)
 Updates the current checksum with the specified vector of bytes.
virtual void update (const std::vector< unsigned char > &buffer, int offset, int length)
 Updates the current checksum with the specified array of bytes.
virtual void update (const unsigned char *buffer, int size, int offset, int length)
 Updates the current checksum with the specified array of bytes.
virtual void update (int byte)
 Updates the current checksum with the specified byte value.

Detailed Description

Clas that can be used to compute an Adler-32 Checksum for a data stream.

The Alder-32 checksum trades reliability for speed over the CRC-32 algorithm.

Since:
1.0

Constructor & Destructor Documentation

decaf::util::zip::Adler32::Adler32 ( )
virtual decaf::util::zip::Adler32::~Adler32 ( ) [virtual]

Member Function Documentation

virtual long long decaf::util::zip::Adler32::getValue ( ) const [virtual]
Returns:
the current checksum value.

Implements decaf::util::zip::Checksum.

virtual void decaf::util::zip::Adler32::reset ( ) [virtual]

Reset the checksum to its initial value.

Implements decaf::util::zip::Checksum.

virtual void decaf::util::zip::Adler32::update ( const unsigned char *  buffer,
int  size,
int  offset,
int  length 
) [virtual]

Updates the current checksum with the specified array of bytes.

Parameters:
bufferThe buffer to read the updated bytes from.
sizeThe size of the passed buffer.
offsetThe position in the buffer to start reading.
lengthThe amount of data to read from the byte buffer.
Exceptions:
NullPointerExceptionif the passed buffer is NULL.
IndexOutOfBoundsExceptionif offset + length > size of the buffer.

Implements decaf::util::zip::Checksum.

virtual void decaf::util::zip::Adler32::update ( const std::vector< unsigned char > &  buffer,
int  offset,
int  length 
) [virtual]

Updates the current checksum with the specified array of bytes.

Parameters:
bufferThe buffer to read the updated bytes from.
offsetThe position in the buffer to start reading.
lengthThe amount of data to read from the byte buffer.
Exceptions:
IndexOutOfBoundsExceptionif offset + length > size of the buffer.

Implements decaf::util::zip::Checksum.

virtual void decaf::util::zip::Adler32::update ( const std::vector< unsigned char > &  buffer) [virtual]

Updates the current checksum with the specified vector of bytes.

Parameters:
bufferThe buffer to read the updated bytes from.

Implements decaf::util::zip::Checksum.

virtual void decaf::util::zip::Adler32::update ( int  byte) [virtual]

Updates the current checksum with the specified byte value.

Parameters:
byteThe byte value to update the current Checksum with (0..255).

Implements decaf::util::zip::Checksum.


The documentation for this class was generated from the following file: