FileDocCategorySizeDatePackage
CMSTypedStream.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)2350Wed Oct 01 10:55:28 BST 2008org.bouncycastle.cms

CMSTypedStream

public class CMSTypedStream extends Object

Fields Summary
private static final int
BUF_SIZ
private final String
_oid
private final InputStream
_in
private final int
_bufSize
Constructors Summary
public CMSTypedStream(InputStream in)

    
     
         
    
        this(PKCSObjectIdentifiers.data.getId(), in, BUF_SIZ);
    
public CMSTypedStream(String oid, InputStream in)

        this(oid, in, BUF_SIZ);
    
public CMSTypedStream(String oid, InputStream in, int bufSize)

        _oid = oid;
        _bufSize = bufSize;
        _in = new FullReaderStream(in, bufSize);
    
Methods Summary
public voiddrain()

        byte[] buf = new byte[_bufSize];
        
        while ((_in.read(buf, 0, buf.length) > 0))
        {
            // keep going...
        }
        
        _in.close();
    
public java.io.InputStreamgetContentStream()

        return _in;
    
public java.lang.StringgetContentType()

        return _oid;