directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r725641 - /directory/shared/branches/shared-mina2/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PagedSearchControl.java
Date Thu, 11 Dec 2008 10:24:16 GMT
Author: elecharny
Date: Thu Dec 11 02:24:15 2008
New Revision: 725641

URL: http://svn.apache.org/viewvc?rev=725641&view=rev
Log:
Compute an int from a byte array for the cookie

Modified:
    directory/shared/branches/shared-mina2/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PagedSearchControl.java

Modified: directory/shared/branches/shared-mina2/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PagedSearchControl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-mina2/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PagedSearchControl.java?rev=725641&r1=725640&r2=725641&view=diff
==============================================================================
--- directory/shared/branches/shared-mina2/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PagedSearchControl.java
(original)
+++ directory/shared/branches/shared-mina2/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PagedSearchControl.java
Thu Dec 11 02:24:15 2008
@@ -116,6 +116,17 @@
 
 
     /**
+     * @return The integer value for the current cookie
+     */
+    public int getCookieValue()
+    {
+        int value = ((cookie[0]&0x00FF)<<24) + ((cookie[1]&0x00FF)<<16)
+ ((cookie[2]&0x00FF)<<8) + (cookie[3]&0x00FF);
+        
+        return value;
+    }
+    
+    
+    /**
      * Set the cookie
      *
      * @param cookie The cookie to store in this control



Mime
View raw message