1 17 18 package org.apache.geronimo.util.asn1; 19 20 import java.io.IOException ; 21 import java.util.Enumeration ; 22 23 public class BERSequence 24 extends DERSequence 25 { 26 29 public BERSequence() 30 { 31 } 32 33 36 public BERSequence( 37 DEREncodable obj) 38 { 39 super(obj); 40 } 41 42 45 public BERSequence( 46 DEREncodableVector v) 47 { 48 super(v); 49 } 50 51 53 void encode( 54 DEROutputStream out) 55 throws IOException 56 { 57 if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) 58 { 59 out.write(SEQUENCE | CONSTRUCTED); 60 out.write(0x80); 61 62 Enumeration e = getObjects(); 63 while (e.hasMoreElements()) 64 { 65 out.writeObject(e.nextElement()); 66 } 67 68 out.write(0x00); 69 out.write(0x00); 70 } 71 else 72 { 73 super.encode(out); 74 } 75 } 76 } 77 | Popular Tags |