ParseComposite

try {
    CompositeName composite = new CompositeName(
        "cn=John,o=hits/report/summary.txt");
    String first = composite.get(0);                  // cn=John,o=hits
    String last = composite.get(composite.size()-1);  // summary.txt

    composite.add(0, "wiz.com"); // wiz.com/cn=John,o=hits/report/summary.txt
    composite.remove(2);         // wiz.com/cn=John,o=hits/summary.txt
} catch (NamingException e) {
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.