1 19 20 package com.maverick.crypto.asn1; 21 22 import java.io.IOException ; 23 import java.util.Enumeration ; 24 25 public class BERConstructedSequence 26 extends DERConstructedSequence 27 { 28 30 void encode( 31 DEROutputStream out) 32 throws IOException  33 { 34 if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) 35 { 36 out.write(SEQUENCE | CONSTRUCTED); 37 out.write(0x80); 38 39 Enumeration e = getObjects(); 40 while (e.hasMoreElements()) 41 { 42 out.writeObject(e.nextElement()); 43 } 44 45 out.write(0x00); 46 out.write(0x00); 47 } 48 else 49 { 50 super.encode(out); 51 } 52 } 53 } 54 | Popular Tags |