01: package org.bouncycastle.asn1;
02:
03: import java.io.IOException;
04: import java.io.OutputStream;
05:
06: public class BERSequenceGenerator extends BERGenerator {
07: public BERSequenceGenerator(OutputStream out) throws IOException {
08: super (out);
09:
10: writeBERHeader(DERTags.CONSTRUCTED | DERTags.SEQUENCE);
11: }
12:
13: public BERSequenceGenerator(OutputStream out, int tagNo,
14: boolean isExplicit) throws IOException {
15: super (out, tagNo, isExplicit);
16:
17: writeBERHeader(DERTags.CONSTRUCTED | DERTags.SEQUENCE);
18: }
19:
20: public void addObject(DEREncodable object) throws IOException {
21: object.getDERObject().encode(new DEROutputStream(_out));
22: }
23:
24: public void close() throws IOException {
25: writeBEREnd();
26: }
27: }
|