if (DEBUG) debug("read oid == " + oid);
if (Configuration.DEBUG) log.fine("read oid == " + oid);
  public Extension(byte[] encoded) throws IOException  {    this.encoded = (byte[]) encoded.clone();    DERReader der = new DERReader(encoded);    // Extension ::= SEQUENCE {    DERValue val = der.read();    if (DEBUG) debug("read val  tag == " + val.getTag() + " len == " + val.getLength());    if (!val.isConstructed())      throw new IOException("malformed Extension");    //   extnID    OBJECT IDENTIFIER,    val = der.read();    if (val.getTag() != DER.OBJECT_IDENTIFIER)      throw new IOException("expecting OBJECT IDENTIFIER");    oid = (OID) val.getValue();    if (DEBUG) debug("read oid == " + oid);    //   critical  BOOLEAN DEFAULT FALSE,    val = der.read();    if (val.getTag() == DER.BOOLEAN)      {        critical = ((Boolean) val.getValue()).booleanValue();        val = der.read();      }    else      critical = false;    if (DEBUG) debug("is critical == " + critical);    //   extnValue OCTET STRING }    if (val.getTag() != DER.OCTET_STRING)      throw new IOException("expecting OCTET STRING");    byte[] encval = (byte[]) val.getValue();    isSupported = true;    if (oid.equals(AuthorityKeyIdentifier.ID))      {        value = new AuthorityKeyIdentifier(encval);      }    else if (oid.equals(SubjectKeyIdentifier.ID))      {        value = new SubjectKeyIdentifier(encval);      }    else if (oid.equals(KeyUsage.ID))      {        value = new KeyUsage(encval);      }    else if (oid.equals(PrivateKeyUsagePeriod.ID))      {        value = new PrivateKeyUsagePeriod(encval);      }    else if (oid.equals(CertificatePolicies.ID))      {        value = new CertificatePolicies(encval);      }    else if (oid.equals (PolicyConstraint.ID))      {        value = new PolicyConstraint (encval);      }    else if (oid.equals(PolicyMappings.ID))      {        value = new PolicyMappings(encval);      }    else if (oid.equals(SubjectAlternativeNames.ID))      {        value = new SubjectAlternativeNames(encval);      }    else if (oid.equals(IssuerAlternativeNames.ID))      {        value = new IssuerAlternativeNames(encval);      }    else if (oid.equals(BasicConstraints.ID))      {        value = new BasicConstraints(encval);      }    else if (oid.equals(ExtendedKeyUsage.ID))      {        value = new ExtendedKeyUsage(encval);      }    else if (oid.equals(CRLNumber.ID))      {        value = new CRLNumber(encval);      }    else if (oid.equals(ReasonCode.ID))      {        value = new ReasonCode(encval);      }    else      {        value = new Value(encval);        isSupported = false;      }    if (DEBUG) debug("read value == " + value);  }