directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1086894 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java
Date Wed, 30 Mar 2011 10:09:34 GMT
Author: elecharny
Date: Wed Mar 30 10:09:33 2011
New Revision: 1086894

URL: http://svn.apache.org/viewvc?rev=1086894&view=rev
Log:
Prepared some method handling in the Abstract class

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java?rev=1086894&r1=1086893&r2=1086894&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java
Wed Mar 30 10:09:33 2011
@@ -81,7 +81,29 @@ public abstract class AbstractValue<T> i
         return wrappedValue;
     }
 
-    
+
+    /**
+     * Get the wrapped value as a String.
+     *
+     * @return the wrapped value as a String
+     */
+    public String getString()
+    {
+        throw new UnsupportedOperationException( "Cannot call this method on a binary value");
+    }
+
+
+    /**
+     * Get the wrapped value as a byte[].
+     *
+     * @return the wrapped value as a byte[]
+     */
+    public byte[] getBytes()
+    {
+        throw new UnsupportedOperationException( "Cannot call this method on a String value");
+    }
+
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message