ByteArrayOutputStream bOut = new ByteArrayOutputStream();
DEROutputStream dOut = new DEROutputStream(bOut);
Enumeration e = this.getObjects();
while (e.hasMoreElements())
{
Object obj = e.nextElement();
dOut.writeObject(obj);
}
dOut.close();
byte[] bytes = bOut.toByteArray();
out.writeEncoded(SEQUENCE | CONSTRUCTED, bytes);