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