byte[] ext = (byte[]) extensions.get(oid); if (ext != null) return (byte[]) ext.clone();
Extension e = getExtension(new OID(oid)); if (e != null) { return e.getValue().getEncoded(); }
  public byte[] getExtensionValue(String oid)  {    byte[] ext = (byte[]) extensions.get(oid);    if (ext != null)      return (byte[]) ext.clone();    return null;  }