You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/03/30 12:09:34 UTC

svn commit: r1086894 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java

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}
      */