01: package org.bouncycastle.sasn1;
02:
03: import java.io.ByteArrayOutputStream;
04: import java.io.IOException;
05: import java.io.OutputStream;
06:
07: /**
08: * @deprecated use corresponsding classes in org.bouncycastle.asn1.
09: */
10: public class DerSequenceGenerator extends DerGenerator {
11: private final ByteArrayOutputStream _bOut = new ByteArrayOutputStream();
12:
13: public DerSequenceGenerator(OutputStream out) throws IOException {
14: super (out);
15: }
16:
17: public DerSequenceGenerator(OutputStream out, int tagNo,
18: boolean isExplicit) throws IOException {
19: super (out, tagNo, isExplicit);
20: }
21:
22: public void addObject(DerObject object) throws IOException {
23: _bOut.write(object.getEncoded());
24: }
25:
26: public OutputStream getRawOutputStream() {
27: return _bOut;
28: }
29:
30: public void close() throws IOException {
31: writeDerEncoded(BerTag.CONSTRUCTED | BerTag.SEQUENCE, _bOut
32: .toByteArray());
33: }
34: }
|