Examples of ClientBinaryValue


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

        {
            return ( K ) normalizer.normalize( ( String ) attrVal );
        }
        else
        {
            return ( K ) normalizer.normalize( new ClientBinaryValue( ( byte[] ) attrVal ) ).get();
        }
    }
View Full Code Here

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( I18n.err( I18n.ERR_474 ) );
            }
View Full Code Here

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

                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

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

            {
                clientValue = new ClientStringValue( value.getString() );
            }
            else
            {
                clientValue = new ClientBinaryValue( value.getBytes() );
            }
           
            clientAttribute.add( clientValue );
        }
       
View Full Code Here

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

        {
            if ( value instanceof String )
            {
                try
                {
                    return new ClientBinaryValue( ( ( String ) value ).getBytes( "UTF-8" ) );
                }
                catch ( UnsupportedEncodingException uee )
                {
                    String message = I18n.err( I18n.ERR_48 );
                    LOG.error( message );
View Full Code Here

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

       
        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

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

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

            {
                clientValue = new ClientStringValue( value.getString() );
            }
            else
            {
                clientValue = new ClientBinaryValue( value.getBytes() );
            }
           
            clientAttribute.add( clientValue );
        }
       
View Full Code Here

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

                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

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

        {
            if ( value instanceof String )
            {
                try
                {
                    return new ClientBinaryValue( ( ( String ) value ).getBytes( "UTF-8" ) );
                }
                catch ( UnsupportedEncodingException uee )
                {
                    String message = "The value stored in a non Human Readable attribute as a String should be convertible to a byte[]";
                    LOG.error( message );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.