01: package org.bouncycastle.asn1;
02:
03: import java.io.IOException;
04: import java.util.Enumeration;
05:
06: /**
07: * @deprecated use BERSequence
08: */
09: public class BERConstructedSequence extends DERConstructedSequence {
10: /*
11: */
12: void encode(DEROutputStream out) throws IOException {
13: if (out instanceof ASN1OutputStream
14: || out instanceof BEROutputStream) {
15: out.write(SEQUENCE | CONSTRUCTED);
16: out.write(0x80);
17:
18: Enumeration e = getObjects();
19: while (e.hasMoreElements()) {
20: out.writeObject(e.nextElement());
21: }
22:
23: out.write(0x00);
24: out.write(0x00);
25: } else {
26: super.encode(out);
27: }
28: }
29: }
|