org.bouncycastle.crypto.io

## Class DigestOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - java.io.FilterOutputStream
    - - org.bouncycastle.crypto.io.DigestOutputStream

All Implemented Interfaces:
  java.io.Closeable, java.io.Flushable

    public class DigestOutputStream
    extends java.io.FilterOutputStream

### Field Summary

Fields
`protected Digest` `digest`

### Fields inherited from class java.io.FilterOutputStream

`out`

### Constructor Summary

Constructors
Constructor and Description
`DigestOutputStream(java.io.OutputStream stream, Digest digest)`

### Method Summary

Methods
`Digest` `getDigest()`
`void` `write(byte[] b, int off, int len)`
`void` `write(int b)`

### Methods inherited from class java.io.FilterOutputStream

`close, flush, write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### digest

    protected Digest digest

### Constructor Detail

#### DigestOutputStream

    public DigestOutputStream(java.io.OutputStream stream,
                      Digest digest)

### Method Detail

#### write

    public void write(int b)
               throws java.io.IOException

Overrides:
  `write` in class `java.io.FilterOutputStream`
Throws:
  `java.io.IOException`

#### write

    public void write(byte[] b,
             int off,
             int len)
               throws java.io.IOException

Overrides:
  `write` in class `java.io.FilterOutputStream`
Throws:
  `java.io.IOException`

#### getDigest

    public Digest getDigest()