public class DigesterOutputStream extends OutputStream
Constructor and Description |
---|
DigesterOutputStream(MessageDigest md)
Creates a DigesterOutputStream.
|
DigesterOutputStream(MessageDigest md,
boolean buffer)
Creates a DigesterOutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
byte[] |
getDigestValue() |
InputStream |
getInputStream() |
void |
write(byte[] input,
int offset,
int len) |
void |
write(int input) |
flush, write
public DigesterOutputStream(MessageDigest md)
md
- the MessageDigestpublic DigesterOutputStream(MessageDigest md, boolean buffer)
md
- the MessageDigestbuffer
- if true, caches the input bytespublic void write(int input)
write
in class OutputStream
public void write(byte[] input, int offset, int len)
write
in class OutputStream
public byte[] getDigestValue()
public InputStream getInputStream()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.