/** * Encode the Referral message to a PDU. * * @param buffer The buffer where to put the PDU * @param referral The referral to encode * @exception EncoderException If the encoding failed */ public static void encodeReferral( ByteBuffer buffer, Referral referral ) throws EncoderException { Collection<byte[]> ldapUrlsBytes = referral.getLdapUrlsBytes(); if ( ( ldapUrlsBytes != null ) && ( !ldapUrlsBytes.isEmpty() ) ) { // Encode the referrals sequence // The referrals length MUST have been computed before ! buffer.put( ( byte ) LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG ); buffer.put( TLV.getBytes( referral.getReferralLength() ) ); // Each referral for ( byte[] ldapUrlBytes : ldapUrlsBytes ) { // Encode the current referral BerValue.encode( buffer, ldapUrlBytes ); } } }
/** * Encode the Referral message to a PDU. * * @param buffer The buffer where to put the PDU * @param referral The referral to encode * @exception EncoderException If the encoding failed */ public static void encodeReferral( ByteBuffer buffer, Referral referral ) throws EncoderException { Collection<byte[]> ldapUrlsBytes = referral.getLdapUrlsBytes(); if ( ( ldapUrlsBytes != null ) && ( !ldapUrlsBytes.isEmpty() ) ) { // Encode the referrals sequence // The referrals length MUST have been computed before ! buffer.put( ( byte ) LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG ); buffer.put( TLV.getBytes( referral.getReferralLength() ) ); // Each referral for ( byte[] ldapUrlBytes : ldapUrlsBytes ) { // Encode the current referral BerValue.encode( buffer, ldapUrlBytes ); } } }
/** * Encode the Referral message to a PDU. * * @param buffer The buffer where to put the PDU * @param referral The referral to encode * @exception EncoderException If the encoding failed */ public static void encodeReferral( ByteBuffer buffer, Referral referral ) throws EncoderException { Collection<byte[]> ldapUrlsBytes = referral.getLdapUrlsBytes(); if ( ( ldapUrlsBytes != null ) && ( !ldapUrlsBytes.isEmpty() ) ) { // Encode the referrals sequence // The referrals length MUST have been computed before ! buffer.put( ( byte ) LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG ); buffer.put( TLV.getBytes( referral.getReferralLength() ) ); // Each referral for ( byte[] ldapUrlBytes : ldapUrlsBytes ) { // Encode the current referral BerValue.encode( buffer, ldapUrlBytes ); } } }
for ( byte[] ldapUrlBytes : referral.getLdapUrlsBytes() )
for ( byte[] ldapUrlBytes : referral.getLdapUrlsBytes() )
for ( byte[] ldapUrlBytes : referral.getLdapUrlsBytes() )