Examples of encode()


Examples of org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdown.encode()

        assertEquals( 0x08, gracefulShutdown.computeLength() );

        // Check the encoding
        try
        {
            ByteBuffer bb1 = gracefulShutdown.encode();

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

            assertEquals( encodedPdu, decodedPdu );
        }

Examples of org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureRequestDecorator.encode()

        assertEquals( "parameter3", Strings.utf8ToString( ( byte[] ) storedProcedure.getParameterValue( 2 ) ) );

        // Check the encoding
        try
        {
            ByteBuffer bb = storedProcedure.encode();
            String encodedPdu = Strings.dumpBytes( bb.array() );
            assertEquals( encodedPdu, decodedPdu );
        }
        catch ( EncoderException ee )
        {

Examples of org.apache.directory.server.changepw.io.ChangePasswordDataEncoder.encode()

        dataModifier.setTargetName( targetPrincipalName );
        dataModifier.setTargetRealm( "EXAMPLE.COM" );
        ChangePasswordData data = dataModifier.getChangePasswdData();

        ChangePasswordDataEncoder encoder = new ChangePasswordDataEncoder();
        byte[] dataBytes = encoder.encode( data );

        privPartModifier.setUserData( dataBytes );

        privPartModifier.setSenderAddress( new HostAddress( InetAddress.getLocalHost() ) );
        EncKrbPrivPart encReqPrivPart = privPartModifier.getEncKrbPrivPart();

Examples of org.apache.directory.server.changepw.io.ChangePasswordErrorEncoder.encode()

    private void encodeError( ChangePasswordError error, IoBuffer buf ) throws IOException
    {
        ChangePasswordErrorEncoder encoder = new ChangePasswordErrorEncoder();

        encoder.encode( buf.buf(), error );
    }
}

Examples of org.apache.directory.server.changepw.io.ChangePasswordReplyEncoder.encode()

    private void encodeReply( ChangePasswordReply reply, IoBuffer buf ) throws IOException
    {
        ChangePasswordReplyEncoder encoder = new ChangePasswordReplyEncoder();

        encoder.encode( buf.buf(), reply );
    }


    private void encodeError( ChangePasswordError error, IoBuffer buf ) throws IOException
    {

Examples of org.apache.directory.server.kerberos.shared.io.encoder.ApplicationReplyEncoder.encode()

    public void encode( ByteBuffer buf, ChangePasswordReply message ) throws IOException
    {
        // Build application reply bytes
        ApplicationReply appReply = message.getApplicationReply();
        ApplicationReplyEncoder appEncoder = new ApplicationReplyEncoder();
        byte[] encodedAppReply = appEncoder.encode( appReply );

        // Build private message bytes
        PrivateMessage privateMessage = message.getPrivateMessage();
        PrivateMessageEncoder privateEncoder = new PrivateMessageEncoder();
        byte[] privateBytes = privateEncoder.encode( privateMessage );

Examples of org.apache.directory.server.kerberos.shared.io.encoder.ApplicationRequestEncoder.encode()

        applicationRequest.setApOptions( new ApOptions() );
        applicationRequest.setTicket( ticket );
        applicationRequest.setEncPart( authenticator );

        ApplicationRequestEncoder encoder = new ApplicationRequestEncoder();
        byte[] encodedApReq = encoder.encode( applicationRequest );

        PaData[] paData = new PaData[1];

        PaData preAuth = new PaData();
        preAuth.setPaDataType( PaDataType.PA_TGS_REQ );

Examples of org.apache.directory.server.kerberos.shared.io.encoder.Encoder.encode()

            throw new IOException( I18n.err( I18n.ERR_599, encodableClass ) );
        }

        Encoder encoder = factory.getEncoder();

        return encoder.encode( encodable );
    }


    private Encodable decode( Class encodable, byte[] plainText ) throws IOException
    {

Examples of org.apache.directory.server.kerberos.shared.io.encoder.ErrorMessageEncoder.encode()

    public void encode( ByteBuffer buf, ChangePasswordError message ) throws IOException
    {
        // Build error message bytes
        ErrorMessage errorMessage = message.getErrorMessage();
        ErrorMessageEncoder errorEncoder = new ErrorMessageEncoder();
        byte[] errorBytes = errorEncoder.encode( errorMessage );

        short messageLength = ( short ) ( HEADER_LENGTH + errorBytes.length );
        buf.putShort( messageLength );

        short protocolVersion = 1;

Examples of org.apache.directory.server.kerberos.shared.io.encoder.PrivateMessageEncoder.encode()

        byte[] encodedAppRequest = appEncoder.encode( appRequest );

        // Build private message bytes
        PrivateMessage privateMessage = message.getPrivateMessage();
        PrivateMessageEncoder privateEncoder = new PrivateMessageEncoder();
        byte[] privateBytes = privateEncoder.encode( privateMessage );

        short messageLength = ( short ) ( HEADER_LENGTH + encodedAppRequest.length + privateBytes.length );

        short protocolVersion = 1;
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.