Package org.apache.directory.shared.ldap.entry.client

Examples of org.apache.directory.shared.ldap.entry.client.ClientBinaryValue


                    for ( byte b:val )
                    {
                        newVal[i++] = (byte)(b & 0x007F);
                    }
                   
                    return new ClientBinaryValue( StringTools.trim( newVal ) );
                }

                throw new IllegalStateException( "expected byte[] to normalize" );
            }
View Full Code Here


        assertTrue( attr9.contains( NULL_STRING_VALUE ) );
        assertTrue( attr9.contains( "ab" ) );

        ServerAttribute attr10 = new DefaultServerAttribute( atPwd );
       
        nbAdded = attr10.add( new ClientBinaryValue( null ), new ClientBinaryValue( BYTES1 ) );
        assertEquals( 2, nbAdded );
        assertFalse( attr10.isHR() );
        assertTrue( attr10.contains( NULL_BINARY_VALUE ) );
        assertTrue( attr10.contains( BYTES1 ) );
    }
View Full Code Here

            {
               normalized = ( K ) attribute.getEquality().getNormalizer().normalize( (String)attrVal );
            }
            else
            {
                normalized = ( K ) attribute.getEquality().getNormalizer().normalize( new ClientBinaryValue( (byte[])attrVal ) ).get();
            }

            // Double map it so if we use an already normalized
            // value we can get back the same normalized value.
            // and not have to regenerate a second time.
View Full Code Here

       
        Value<String> strValueTop = new ClientStringValue( "top" );
        Value<String> strValuePerson = new ClientStringValue( "person" );
        Value<String> strNullValue = new ClientStringValue( null);

        Value<byte[]> binValue1 = new ClientBinaryValue( BYTES1 );
        Value<byte[]> binValue2 = new ClientBinaryValue( BYTES2 );
        Value<byte[]> binNullValue = new ClientBinaryValue( null );
       
        entry.put( "ObjectClass", atOC, strValueTop, strValuePerson, strNullValue );
        entry.put( "UserPassword", atPwd, binValue1, binValue2, binNullValue );

        String expected =
View Full Code Here

            {
                normalized = new ClientStringValue( ( String ) ncn.normalizeByName( attribute, value.getString() ) );
            }
            else
            {
                normalized = new ClientBinaryValue( ( byte[] ) ncn.normalizeByName( attribute, value.getBytes() ) );
            }

            return normalized;
        }
        catch ( NamingException ne )
View Full Code Here

        assertTrue( attr9.contains( NULL_STRING_VALUE ) );
        assertTrue( attr9.contains( "ab" ) );

        ServerAttribute attr10 = new DefaultServerAttribute( atPwd );
       
        nbAdded = attr10.add( new ClientBinaryValue( null ), new ClientBinaryValue( BYTES1 ) );
        assertEquals( 2, nbAdded );
        assertFalse( attr10.isHR() );
        assertTrue( attr10.contains( NULL_BINARY_VALUE ) );
        assertTrue( attr10.contains( BYTES1 ) );
    }
View Full Code Here

                    for ( byte b:val )
                    {
                        newVal[i++] = (byte)(b & 0x007F);
                    }
                   
                    return new ClientBinaryValue( StringTools.trim( newVal ) );
                }

                throw new IllegalStateException( "expected byte[] to normalize" );
            }
View Full Code Here

                Object value = attr.get();
                SimpleNode<?> node;

                if ( value instanceof byte[] )
                {
                    node = new EqualityNode<byte[]>( attr.getID(), new ClientBinaryValue( ( byte[] ) value ) );
                }
                else
                {
                    node = new EqualityNode<String>( attr.getID(), new ClientStringValue( ( String ) value ) );
                }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.entry.client.ClientBinaryValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.