BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) );
BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) );
BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) );
/** * Encode the AdDirSync control. We use the client side control. * * @param buffer The encoded sink * @return A ByteBuffer that contains the encoded PDU * @throws EncoderException If anything goes wrong while encoding. */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { if ( buffer == null ) { throw new EncoderException( I18n.err( I18n.ERR_08000_CANNOT_PUT_A_PDU_IN_NULL_BUFFER ) ); } // Encode the SEQ buffer.put( UniversalTag.SEQUENCE.getValue() ); buffer.put( TLV.getBytes( adDirSyncLength ) ); // Encode the flags BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) ); // Encode the MaxReturnLength BerValue.encode( buffer, getMaxReturnLength() ); // Encode the cookie BerValue.encode( buffer, getCookie() ); return buffer; }
/** * Encode the AdDirSync control. We use the client side control. * * @param buffer The encoded sink * @return A ByteBuffer that contains the encoded PDU * @throws EncoderException If anything goes wrong while encoding. */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { if ( buffer == null ) { throw new EncoderException( I18n.err( I18n.ERR_08000_CANNOT_PUT_A_PDU_IN_NULL_BUFFER ) ); } // Encode the SEQ buffer.put( UniversalTag.SEQUENCE.getValue() ); buffer.put( TLV.getBytes( adDirSyncLength ) ); // Encode the flags BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) ); // Encode the MaxReturnLength BerValue.encode( buffer, getMaxReturnLength() ); // Encode the cookie BerValue.encode( buffer, getCookie() ); return buffer; }
/** * Encode the AdDirSync control. We use the client side control. * * @param buffer The encoded sink * @return A ByteBuffer that contains the encoded PDU * @throws EncoderException If anything goes wrong while encoding. */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { if ( buffer == null ) { throw new EncoderException( I18n.err( I18n.ERR_08000_CANNOT_PUT_A_PDU_IN_NULL_BUFFER ) ); } // Encode the SEQ buffer.put( UniversalTag.SEQUENCE.getValue() ); buffer.put( TLV.getBytes( adDirSyncLength ) ); // Encode the flags BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) ); // Encode the MaxReturnLength BerValue.encode( buffer, getMaxReturnLength() ); // Encode the cookie BerValue.encode( buffer, getCookie() ); return buffer; }
int flagsLength = BerValue.getNbBytes( AdDirSyncFlag.getBitmask( getFlags() ) ); adDirSyncLength = 1 + TLV.getNbBytes( flagsLength ) + flagsLength;
int flagsLength = BerValue.getNbBytes( AdDirSyncFlag.getBitmask( getFlags() ) ); adDirSyncLength = 1 + TLV.getNbBytes( flagsLength ) + flagsLength;
int flagsLength = BerValue.getNbBytes( AdDirSyncFlag.getBitmask( getFlags() ) ); adDirSyncLength = 1 + TLV.getNbBytes( flagsLength ) + flagsLength;