1String dn = "CN=Jimmy Blooptoop,OU=Someplace,OU=Employees,DC=Bloopsoft-Inc";
2LdapName ln = new LdapName(dn);
3
4for(Rdn rdn : ln.getRdns()) {
5 if(rdn.getType().equalsIgnoreCase("CN")) {
6 System.err.println("CN is: " + rdn.getValue());
7 break;
8 }
9}