FileDocCategorySizeDatePackage
DigestInputStream.javaAPI DocAndroid 1.5 API910Wed May 06 22:41:06 BST 2009org.bouncycastle.crypto.io

DigestInputStream

public class DigestInputStream extends FilterInputStream

Fields Summary
protected org.bouncycastle.crypto.Digest
digest
Constructors Summary
public DigestInputStream(InputStream stream, org.bouncycastle.crypto.Digest digest)

        super(stream);
        this.digest = digest;
    
Methods Summary
public org.bouncycastle.crypto.DigestgetDigest()

        return digest;
    
public intread()

        int b = in.read();

        if (b >= 0)
        {
            digest.update((byte)b);
        }
        return b;
    
public intread(byte[] b, int off, int len)

        int n = in.read(b, off, len);
        if (n > 0)
        {
            digest.update(b, off, n);
        }
        return n;