public abstract class Digester<T extends Digest>
extends java.io.OutputStream
| Modifier and Type | Field and Description |
|---|---|
protected java.security.MessageDigest |
md |
| Constructor and Description |
|---|
Digester(java.security.MessageDigest instance,
java.io.OutputStream... out) |
| Modifier and Type | Method and Description |
|---|---|
abstract T |
digest() |
abstract T |
digest(byte[] bytes) |
T |
from(byte[] f) |
T |
from(java.io.File f) |
T |
from(java.io.InputStream in) |
abstract java.lang.String |
getAlgorithm() |
java.security.MessageDigest |
getMessageDigest() |
void |
setOutputs(java.io.OutputStream... out) |
void |
write(byte[] buffer,
int offset,
int length) |
void |
write(int b) |
public Digester(java.security.MessageDigest instance,
java.io.OutputStream... out)
public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic java.security.MessageDigest getMessageDigest()
throws java.lang.Exception
java.lang.Exceptionpublic T from(java.io.InputStream in) throws java.lang.Exception
java.lang.Exceptionpublic void setOutputs(java.io.OutputStream... out)
public abstract T digest() throws java.lang.Exception
java.lang.Exceptionpublic abstract T digest(byte[] bytes) throws java.lang.Exception
java.lang.Exceptionpublic abstract java.lang.String getAlgorithm()
public T from(java.io.File f) throws java.lang.Exception
java.lang.Exceptionpublic T from(byte[] f) throws java.lang.Exception
java.lang.ExceptionCopyright (c) aQute SARL (2000, 2017) and others. All Rights Reserved.