protected Checksum createChecksumObject() throws ClassNotFoundException,
          InstantiationException, IllegalAccessException {
    if (type == AlgoChecksumType.ADLER32) {
      return new Adler32();
    }
    else if (type == AlgoChecksumType.CRC32) {
      return new CRC32();
    }
    else {
      throw new IllegalArgumentException("Invalid type of algorithm.");
    }
  }