001 package org.apache.commons.ssl.asn1;
002
003 import java.io.IOException;
004 import java.io.OutputStream;
005
006 public class BERSequenceGenerator
007 extends BERGenerator {
008 public BERSequenceGenerator(
009 OutputStream out)
010 throws IOException {
011 super(out);
012
013 writeBERHeader(DERTags.CONSTRUCTED | DERTags.SEQUENCE);
014 }
015
016 public BERSequenceGenerator(
017 OutputStream out,
018 int tagNo,
019 boolean isExplicit)
020 throws IOException {
021 super(out, tagNo, isExplicit);
022
023 writeBERHeader(DERTags.CONSTRUCTED | DERTags.SEQUENCE);
024 }
025
026 public void addObject(
027 DEREncodable object)
028 throws IOException {
029 object.getDERObject().encode(new DEROutputStream(_out));
030 }
031
032 public void close()
033 throws IOException {
034 writeBEREnd();
035 }
036 }