title: How to extract value from javax.naming.directory.Attribute
body: <p>The question says everything. When I am printing an Attribute it is:</p>
  
  <pre><code>cn: WF-008-DAM-PS
  </code></pre>
  
  <p>The code snippet is:</p>
  
  <pre><code>private void searchGroup() throws NamingException {
      NamingEnumeration&lt;SearchResult&gt; searchResults = getLdapDirContext().search(groupDN, "(objectclass=groupOfUniqueNames)", getSearchControls());
      String searchGroupCn = getCNForBrand(m_binder.getLocal("brandId"), m_binder.getLocal("brandName"));
      Log.info(searchGroupCn);
      while (searchResults.hasMore()) {
          SearchResult searchResult = searchResults.next();
          Attributes attributes = searchResult.getAttributes();
          Attribute groupCn = attributes.get("cn");
          if(groupCn != null) {
              Log.info(groupCn.toString());               
          }
      }
  }
  </code></pre>
  
  <p>How can I only get the value that is: <code>WF-008-DAM-PS</code>, that is without the key portion?
  Regards.</p>