directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r440121 - /directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
Date Mon, 04 Sep 2006 17:17:29 GMT
Author: elecharny
Date: Mon Sep  4 10:17:29 2006
New Revision: 440121

URL: http://svn.apache.org/viewvc?view=rev&rev=440121
Log:
Added the getNbBytes method for shared/ldap to compile

Modified:
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java

Modified: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?view=diff&rev=440121&r1=440120&r2=440121
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
Mon Sep  4 10:17:29 2006
@@ -23,6 +23,9 @@
     /** The LoggerFactory used by this class */
     private static Logger log = LoggerFactory.getLogger( LdapDN.class );
 
+    /** The bytes representation of the normName */
+    private byte[] bytes;
+
     /**
      * Determines whether this name is empty. An empty name is one with zero
      * components.
@@ -291,5 +294,16 @@
     public int compareTo( Object obj )
     {
         return 0;
+    }
+    
+    /**
+     * Get the number of bytes necessary to store this DN
+     *
+     * @return A integer, which is the size of the UTF-8 byte array
+     */
+    public static int getNbBytes( Name dn )
+    {
+        LdapDN ldapDn = ( LdapDN ) dn;
+        return ldapDn.bytes == null ? 0 : ldapDn.bytes.length;
     }
 }



Mime
View raw message