001 package org.apache.commons.ssl.asn1; 002 003 import java.io.IOException; 004 import java.util.Enumeration; 005 006 /** @deprecated use BERSequence */ 007 public class BERConstructedSequence 008 extends DERConstructedSequence { 009 /* 010 */ 011 void encode( 012 DEROutputStream out) 013 throws IOException { 014 if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) { 015 out.write(SEQUENCE | CONSTRUCTED); 016 out.write(0x80); 017 018 Enumeration e = getObjects(); 019 while (e.hasMoreElements()) { 020 out.writeObject(e.nextElement()); 021 } 022 023 out.write(0x00); 024 out.write(0x00); 025 } else { 026 super.encode(out); 027 } 028 } 029 }