activemq-cpp-3.6.0
decaf::util::zip::CRC32 Class Reference

Class that can be used to compute a CRC-32 checksum for a data stream. More...

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

Inheritance diagram for decaf::util::zip::CRC32:

Public Member Functions

 CRC32 ()
virtual ~CRC32 ()
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.
- Public Member Functions inherited from decaf::util::zip::Checksum
virtual ~Checksum ()

Detailed Description

Class that can be used to compute a CRC-32 checksum for a data stream.

Since
1.0

Constructor & Destructor Documentation

decaf::util::zip::CRC32::CRC32 ( )
virtual decaf::util::zip::CRC32::~CRC32 ( )
virtual

Member Function Documentation

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

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

virtual void decaf::util::zip::CRC32::reset ( )
virtual

Reset the checksum to its initial value.

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

virtual void decaf::util::zip::CRC32::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::CRC32::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::CRC32::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::CRC32::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: