- java.lang.Object
 - 
- java.io.OutputStream
 - 
- io.github.mmm.crypto.io.OutputStreamWrapper
 - 
- io.github.mmm.crypto.hash.HashOutputStream
 
 
 
 
- 
- All Implemented Interfaces:
 Closeable,Flushable,AutoCloseable
public class HashOutputStream extends OutputStreamWrapper
AnOutputStreamthat writes to aMessageDigest. UnlikeDigestOutputStreamit does not wrap anOutputStreamto write through.- Since:
 - 1.0.0
 - Author:
 - Joerg Hohwiller (hohwille at users.sourceforge.net)
 
 
- 
- 
Constructor Summary
Constructors Constructor Description HashOutputStream(HashCreator hashGenerator)The constructor.HashOutputStream(HashCreator hashGenerator, OutputStream delegate)The constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(byte[] b, int off, int len)voidwrite(int b)- 
Methods inherited from class io.github.mmm.crypto.io.OutputStreamWrapper
close, getDelegate, isClosed, requireNotClosed, write 
- 
Methods inherited from class java.io.OutputStream
flush, nullOutputStream 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
HashOutputStream
public HashOutputStream(HashCreator hashGenerator)
The constructor.- Parameters:
 hashGenerator- theHashCreator.
 
- 
HashOutputStream
public HashOutputStream(HashCreator hashGenerator, OutputStream delegate)
The constructor.- Parameters:
 hashGenerator- theHashCreator.delegate- thedelegate. May benull.
 
 - 
 
- 
Method Detail
- 
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
 writein classOutputStreamWrapper- Throws:
 IOException
 
- 
write
public void write(int b) throws IOException- Overrides:
 writein classOutputStreamWrapper- Throws:
 IOException
 
 - 
 
 -