_digests = gen.getGeneratedDigests();
        public void write(OutputStream out)            throws IOException        {            try            {                CMSSignedDataStreamGenerator gen = getGenerator();                                OutputStream signingStream = gen.open(out, _encapsulate);                                if (_content != null)                {                    if (!_encapsulate)                    {                        writeBodyPart(signingStream, _content);                    }                    else                    {                        _content.writeTo(signingStream);                    }                }                                signingStream.close();            }            catch (MessagingException e)            {                throw new IOException(e.toString());            }            catch (NoSuchAlgorithmException e)            {                throw new IOException(e.toString());            }            catch (NoSuchProviderException e)            {                throw new IOException(e.toString());            }            catch (CMSException e)            {                throw new IOException(e.toString());            }            catch (InvalidKeyException e)            {                throw new IOException(e.toString());            }            catch (CertStoreException e)            {                throw new IOException(e.toString());            }        }