public class CommonsDigester extends CompositeDigester
DigestingParser.Digester
that 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.
Modifier and Type | Class and Description |
---|---|
static class |
CommonsDigester.DigestAlgorithm |
Constructor and Description |
---|
CommonsDigester(int markLimit,
CommonsDigester.DigestAlgorithm... algorithms)
Deprecated.
|
CommonsDigester(int markLimit,
java.lang.String algorithmString)
Include a string representing the comma-separated algorithms to run: e.g.
|
Modifier and Type | Method and Description |
---|---|
static CommonsDigester.DigestAlgorithm[] |
parse(java.lang.String s)
Deprecated.
use the
CommonsDigester(int, String) instead |
digest
public CommonsDigester(int markLimit, java.lang.String algorithmString)
markLimit
- algorithmString
- public CommonsDigester(int markLimit, CommonsDigester.DigestAlgorithm... algorithms)
CommonsDigester(int, String)
markLimit
- limit for mark/reset; after this limit is hit, the
stream is reset and spooled to diskalgorithms
- algorithms to run@Deprecated public static CommonsDigester.DigestAlgorithm[] parse(java.lang.String s)
CommonsDigester(int, String)
insteadCommonsDigester(int, String)
.s
- comma-delimited (no space) list of algorithms to use: md5,sha256."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"