home *** CD-ROM | disk | FTP | other *** search
- package netscape.ldap;
-
- import java.util.Enumeration;
- import java.util.Vector;
-
- class LDAPAttrStrEnumeration implements Enumeration {
- private Vector m_v = new Vector();
- private int m_index;
-
- static String convertToUTF8(byte[] var0) throws Exception {
- return new String(var0, "UTF8");
- }
-
- static LDAPAttrStrEnumeration getStringEnumeration(Vector var0) {
- LDAPAttrStrEnumeration var1 = new LDAPAttrStrEnumeration();
-
- for(int var2 = 0; var2 < var0.size(); ++var2) {
- if (var0.elementAt(var2) != null) {
- try {
- String var3 = convertToUTF8((byte[])var0.elementAt(var2));
- var1.m_v.addElement(var3);
- } catch (Exception var4) {
- return null;
- }
- }
- }
-
- return var1;
- }
-
- public boolean hasMoreElements() {
- return this.m_index < this.m_v.size();
- }
-
- public Object nextElement() {
- return this.m_v.elementAt(this.m_index++);
- }
- }
-