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

An interface used to represent Checksum values in the Zip package. More...

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

Inheritance diagram for decaf::util::zip::Checksum:

Public Member Functions

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

Detailed Description

An interface used to represent Checksum values in the Zip package.

Since
1.0

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implemented in decaf::util::zip::Adler32, and decaf::util::zip::CRC32.

virtual void decaf::util::zip::Checksum::reset ( )
pure virtual

Reset the checksum to its initial value.

Implemented in decaf::util::zip::Adler32, and decaf::util::zip::CRC32.

virtual void decaf::util::zip::Checksum::update ( const std::vector< unsigned char > &  buffer)
pure virtual

Updates the current checksum with the specified vector of bytes.

Parameters
bufferThe buffer to read the updated bytes from.

Implemented in decaf::util::zip::Adler32, and decaf::util::zip::CRC32.

virtual void decaf::util::zip::Checksum::update ( const std::vector< unsigned char > &  buffer,
int  offset,
int  length 
)
pure 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.

Implemented in decaf::util::zip::Adler32, and decaf::util::zip::CRC32.

virtual void decaf::util::zip::Checksum::update ( const unsigned char *  buffer,
int  size,
int  offset,
int  length 
)
pure 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.

Implemented in decaf::util::zip::Adler32, and decaf::util::zip::CRC32.

virtual void decaf::util::zip::Checksum::update ( int  byte)
pure virtual

Updates the current checksum with the specified byte value.

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

Implemented in decaf::util::zip::Adler32, and decaf::util::zip::CRC32.


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