Package org.apache.directory.api.ldap.extras.controls.syncrepl_impl

Examples of org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator.computeLength()


        SyncRequestValue syncRequestValue = new SyncRequestValueImpl();
        syncRequestValue.setMode( SynchronizationModeEnum.REFRESH_ONLY );
       
        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec, syncRequestValue );
       
        ByteBuffer buffer = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
       
        String expected = Strings.dumpBytes( new byte[]{ 0x30, 0x03, 0x0A, 0x01, 0x01 } );
        assertEquals( expected, Strings.dumpBytes( buffer.array() ) );
    }
   
View Full Code Here


        SyncRequestValue syncRequestValue = new SyncRequestValueImpl();
        syncRequestValue.setMode( SynchronizationModeEnum.REFRESH_ONLY );
       
        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec, syncRequestValue );
       
        ByteBuffer buffer = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
       
        String expected = Strings.dumpBytes( new byte[]{ 0x30, 0x03, 0x0A, 0x01, 0x01 } );
        assertEquals( expected, Strings.dumpBytes( buffer.array() ) );
    }
   
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.