Information

0
Story Points

Technologies

Decompiled Java File
package iaik.x509.extensions;

import iaik.asn1.ASN;
import iaik.asn1.ASN1Object;
import iaik.asn1.CodingException;
import iaik.asn1.structures.AccessDescription;
import iaik.x509.V3Extension;
import iaik.x509.X509ExtensionException;
import java.util.Enumeration;
import java.util.Vector;

public abstract class InfoAccess extends V3Extension {
   // $FF: synthetic field
   static Class b;
   private Vector a;

   static Class a(String var0) {
      try {
         return Class.forName(var0);
      } catch (ClassNotFoundException var2) {
         throw new NoClassDefFoundError(var2.getMessage());
      }
   }

   public String toString() {
      StringBuffer var1 = new StringBuffer();

      for(int var2 = 0; var2 < this.a.size(); ++var2) {
         var1.append(this.a.elementAt(var2).toString() + "\n");
      }

      var1.setLength(var1.length() - 1);
      return var1.toString();
   }

   public ASN1Object toASN1Object() throws X509ExtensionException {
      try {
         return ASN.createSequenceOf(this.a);
      } catch (CodingException var2) {
         throw new X509ExtensionException(var2.toString());
      }
   }

   public void removeAllAccessDescriptions() {
      this.a.removeAllElements();
   }

   public void init(ASN1Object var1) throws X509ExtensionException {
      this.a = new Vector();
      AccessDescription[] var2 = null;

      try {
         var2 = (AccessDescription[])ASN.parseSequenceOf(var1, b != null?b:(b = a("iaik.asn1.structures.AccessDescription")));
      } catch (CodingException var4) {
         throw new X509ExtensionException(var4.toString());
      } catch (Exception var5) {
         throw new X509ExtensionException(var5.toString());
      }

      for(int var3 = 0; var3 < var2.length; ++var3) {
         this.a.addElement(var2[var3]);
      }

   }

   public Enumeration getAccessDescriptions() {
      return this.a.elements();
   }

   public void addAccessDescription(AccessDescription var1) throws IllegalArgumentException {
      if(var1 == null) {
         throw new IllegalArgumentException("Cannot add a null accessDescription!");
      } else {
         this.a.addElement(var1);
      }
   }

   public InfoAccess(AccessDescription var1) throws IllegalArgumentException {
      this();
      if(var1 == null) {
         throw new IllegalArgumentException("Cannot create a AuthorityInfoAccess from null accessDescription!");
      } else {
         this.a.addElement(var1);
      }
   }

   public InfoAccess() {
      this.a = new Vector();
   }
}
Page generated: Oct 19, 2017 2:34:25 PM