Class CommonsDigester

java.lang.Object
org.apache.tika.digest.CompositeDigester
org.apache.tika.parser.digestutils.CommonsDigester
All Implemented Interfaces:
Digester

public class CommonsDigester extends CompositeDigester
Implementation of Digester that relies on commons.codec.digest.DigestUtils to calculate digest hashes.

This digester uses TikaInputStream.enableRewind() and TikaInputStream.rewind() to read the entire stream, compute the digest, and then rewind for subsequent processing.

  • Constructor Details

    • CommonsDigester

      public CommonsDigester(List<DigestDef> digests)
      Parameters:
      digests - list of digest definitions (algorithm + encoding pairs)
    • CommonsDigester

      public CommonsDigester(DigestDef.Algorithm... algorithms)
      Parameters:
      algorithms - algorithms to run (uses HEX encoding for all)