Asn1InputStream aIn = new Asn1InputStream(data);
ContentInfoParser cP = new ContentInfoParser((Asn1Sequence)aIn.readObject());
EnvelopedDataParser eP = new EnvelopedDataParser((Asn1Sequence)cP.getContent(BerTag.SEQUENCE));
eP.getRecipientInfos();
EncryptedContentInfoParser ecP = eP.getEncryptedContentInfo();
Asn1OctetString content = (Asn1OctetString)ecP.getEncryptedContent(BerTag.OCTET_STRING);
InputStream in = content.getOctetStream();
while (in.read() >= 0)
{
// do nothing
}