public void load(X509Extension extensions){
  Set<String> critExts=extensions.getCriticalExtensionOIDs();
  Set<String> nonCritExts=extensions.getNonCriticalExtensionOIDs();
  List<X509Ext> sortedExts=new ArrayList<X509Ext>();
  for (Iterator<String> itr=critExts.iterator(); itr.hasNext(); ) {
    String extOid=itr.next();
    byte[] value=extensions.getExtensionValue(extOid);
    X509Ext ext=new X509Ext(new ASN1ObjectIdentifier(extOid),value,true);
    sortedExts.add(ext);
  }
  for (Iterator<String> itr=nonCritExts.iterator(); itr.hasNext(); ) {
    String extOid=itr.next();
    byte[] value=extensions.getExtensionValue(extOid);
    X509Ext ext=new X509Ext(new ASN1ObjectIdentifier(extOid),value,false);
    sortedExts.add(ext);
  }
  Collections.sort(sortedExts,new ExtensionNameComparator());
  data=new Object[sortedExts.size()][3];
  int i=0;
  for (Iterator<X509Ext> itrSortedExts=sortedExts.iterator(); itrSortedExts.hasNext(); ) {
    X509Ext ext=itrSortedExts.next();
    loadRow(ext,i);
    i++;
  }
  fireTableDataChanged();
}

public void load ( X509Extension extensions ) { Set < String > critExts = extensions . getCriticalExtensionOIDs ( ) ; Set < String > nonCritExts = extensions . getNonCriticalExtensionOIDs ( ) ; List < X509Ext > sortedExts = new ArrayList < X509Ext > ( ) ; for ( Iterator < String > itr = critExts . iterator ( ) ; itr . hasNext ( ) ; ) { String extOid = itr . next ( ) ; byte [ ] value = extensions . getExtensionValue ( extOid ) ; X509Ext ext = new X509Ext ( new ASN1ObjectIdentifier ( extOid ) , value , true ) ; sortedExts . add ( ext ) ; } for ( Iterator < String > itr = nonCritExts . iterator ( ) ; itr . hasNext ( ) ; ) { String extOid = itr . next ( ) ; byte [ ] value = extensions . getExtensionValue ( extOid ) ; X509Ext ext = new X509Ext ( new ASN1ObjectIdentifier ( extOid ) , value , false ) ; sortedExts . add ( ext ) ; } Collections . sort ( sortedExts , new ExtensionNameComparator ( ) ) ; data = new Object [ sortedExts . size ( ) ] [ 3 ] ; int i = 0 ; for ( Iterator < X509Ext > itrSortedExts = sortedExts . iterator ( ) ; itrSortedExts . hasNext ( ) ; ) { X509Ext ext = itrSortedExts . next ( ) ; loadRow ( ext , i ) ; i ++ ; } fireTableDataChanged ( ) ; }
load the extensionstablemodel with x . 509 extensions .
