Class CommonsDigester
- java.lang.Object
- 
- org.apache.tika.parser.digest.CompositeDigester
- 
- org.apache.tika.parser.digestutils.CommonsDigester
 
 
- 
- All Implemented Interfaces:
- DigestingParser.Digester
 
 public class CommonsDigester extends CompositeDigester Implementation ofDigestingParser.Digesterthat relies on commons.codec.digest.DigestUtils to calculate digest hashes.This digester tries to use the regular mark/reset protocol on the InputStream. However, this wraps an internal BoundedInputStream, and if the InputStream is not fully read, then this will reset the stream and spool the InputStream to disk (via TikaInputStream) and then digest the file. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classCommonsDigester.DigestAlgorithm
 - 
Constructor SummaryConstructors Constructor Description CommonsDigester(int markLimit, String algorithmString)Include a string representing the comma-separated algorithms to run: e.g.CommonsDigester(int markLimit, CommonsDigester.DigestAlgorithm... algorithms)Deprecated.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CommonsDigester.DigestAlgorithm[]parse(String s)Deprecated.use theCommonsDigester(int, String)instead- 
Methods inherited from class org.apache.tika.parser.digest.CompositeDigesterdigest
 
- 
 
- 
- 
- 
Constructor Detail- 
CommonsDigesterpublic CommonsDigester(int markLimit, String algorithmString)Include a string representing the comma-separated algorithms to run: e.g. "md5,sha1". If you want base 32 encoding instead of hexadecimal, add ":32" to the algorithm, e.g. "md5,sha1:32" Will throw an IllegalArgumentException if an algorithm isn't supported- Parameters:
- markLimit-
- algorithmString-
 
 - 
CommonsDigesterpublic CommonsDigester(int markLimit, CommonsDigester.DigestAlgorithm... algorithms)Deprecated.- Parameters:
- markLimit- limit for mark/reset; after this limit is hit, the stream is reset and spooled to disk
- algorithms- algorithms to run
 
 
- 
 - 
Method Detail- 
parse@Deprecated public static CommonsDigester.DigestAlgorithm[] parse(String s) Deprecated.use theCommonsDigester(int, String)insteadThis returns digest algorithms only. It does not understand the encoding syntax, e.g. "MD5:32" (base 32 encoding of MD5). To parse those, seeCommonsDigester(int, String).- Parameters:
- s- comma-delimited (no space) list of algorithms to use: md5,sha256.
- Returns:
 
 
- 
 
-