Examples of encode()


Examples of org.apache.directory.server.ntp.io.NtpMessageEncoder.encode()

        NtpMessage message = modifier.getNtpMessage();

        ByteBuffer replyByteBuffer = ByteBuffer.allocate( 1024 );

        NtpMessageEncoder encoder = new NtpMessageEncoder();
        encoder.encode( replyByteBuffer, message );

        print( message );

        NtpMessageDecoder decoder = new NtpMessageDecoder();
        NtpMessage reply = decoder.decode( replyByteBuffer );

Examples of org.apache.directory.shared.asn1.AbstractAsn1Object.encode()

            response = kerberosMessage;
        }

        try
        {
            asn1Obj.encode( kerberosMessage.buf() );

            if ( isTcp )
            {
                response.putInt( responseLength );
                response.put( kerberosMessage.buf().array() );

Examples of org.apache.directory.shared.kerberos.components.AdAndOr.encode()

        ByteBuffer bb = ByteBuffer.allocate( adAndOr.computeLength() );

        try
        {
            bb = adAndOr.encode( bb );

            // Check the length
            assertEquals( 0x2D, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.AdIfRelevant.encode()

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( adIfRelevant.computeLength() );

        try
        {
            bb = adIfRelevant.encode( bb );

            // Check the length
            assertEquals( 0x24, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.AdKdcIssued.encode()

        ByteBuffer bb = ByteBuffer.allocate( adKdcIssued.computeLength() );

        // Check the encoding
        try
        {
            bb = adKdcIssued.encode( bb );

            // Check the length
            assertEquals( 0x60, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.AdMandatoryForKdc.encode()

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( adMandatoryForKdc.computeLength() );

        try
        {
            bb = adMandatoryForKdc.encode( bb );

            // Check the length
            assertEquals( 0x24, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.AuthorizationData.encode()

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( authData.computeLength() );

        try
        {
            bb = authData.encode( bb );

            // Check the length
            assertEquals( 0x21, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.Checksum.encode()

        ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );

        try
        {
            bb = checksum.encode( bb );

            // Check the length
            assertEquals( 0x11, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.ETypeInfo.encode()

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( etypeInfo.computeLength() );

        try
        {
            bb = etypeInfo.encode( bb );

            // Check the length
            assertEquals( 0x20, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.ETypeInfo2.encode()

                ByteBuffer buffer = ByteBuffer.allocate( eTypeInfo.computeLength() );
                encTypeInfo = eTypeInfo.encode( buffer ).array();
            }

            ByteBuffer buffer = ByteBuffer.allocate( eTypeInfo2.computeLength() );
            encTypeInfo2 = eTypeInfo2.encode( buffer ).array();
        }
        catch ( EncoderException ioe )
        {
            return null;
        }
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.