1 package org.bouncycastle.asn1; 2 3 import java.io.IOException; 4 5 public class DERSetParser 6 implements ASN1SetParser 7 { 8 private ASN1StreamParser _parser; 9 DERSetParser(ASN1StreamParser parser)10 DERSetParser(ASN1StreamParser parser) 11 { 12 this._parser = parser; 13 } 14 readObject()15 public ASN1Encodable readObject() 16 throws IOException 17 { 18 return _parser.readObject(); 19 } 20 getLoadedObject()21 public ASN1Primitive getLoadedObject() 22 throws IOException 23 { 24 return new DERSet(_parser.readVector(), false); 25 } 26 toASN1Primitive()27 public ASN1Primitive toASN1Primitive() 28 { 29 try 30 { 31 return getLoadedObject(); 32 } 33 catch (IOException e) 34 { 35 throw new ASN1ParsingException(e.getMessage(), e); 36 } 37 } 38 } 39