/** * {@inheritDoc} */ @Override public CodecControl<AdDirSync> newCodecControl() { return new AdDirSyncDecorator( codec ); }
/** * {@inheritDoc} */ @Override public Set<AdDirSyncFlag> getFlags() { return getDecorated().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; }
computeLength(); ByteBuffer buffer = ByteBuffer.allocate( valueLength ); BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) ); BerValue.encode( buffer, getMaxReturnLength() ); BerValue.encode( buffer, getCookie() );
/** * {@inheritDoc} */ @Override public Asn1Object decode( byte[] controlBytes ) throws DecoderException { ByteBuffer bb = ByteBuffer.wrap( controlBytes ); AdDirSyncContainer container = new AdDirSyncContainer( getCodecService(), this ); DECODER.decode( bb, container ); return this; } }
/** * 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; }
computeLength(); ByteBuffer buffer = ByteBuffer.allocate( valueLength ); BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) ); BerValue.encode( buffer, getMaxReturnLength() ); BerValue.encode( buffer, getCookie() );
/** * {@inheritDoc} */ @Override public Asn1Object decode( byte[] controlBytes ) throws DecoderException { ByteBuffer bb = ByteBuffer.wrap( controlBytes ); AdDirSyncContainer container = new AdDirSyncContainer( getCodecService(), this ); DECODER.decode( bb, container ); return this; } }
/** * 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; }
computeLength(); ByteBuffer buffer = ByteBuffer.allocate( valueLength ); BerValue.encode( buffer, AdDirSyncFlag.getBitmask( getFlags() ) ); BerValue.encode( buffer, getMaxReturnLength() ); BerValue.encode( buffer, getCookie() );
/** * {@inheritDoc} */ @Override public void setFlags( Set<AdDirSyncFlag> flags ) { getDecorated().setFlags( flags ); }
/** * {@inheritDoc} */ @Override public CodecControl<AdDirSync> newCodecControl( AdDirSync control ) { return new AdDirSyncDecorator( codec, control ); } }
/** * {@inheritDoc} */ @Override public Asn1Object decode( byte[] controlBytes ) throws DecoderException { ByteBuffer bb = ByteBuffer.wrap( controlBytes ); AdDirSyncContainer container = new AdDirSyncContainer( getCodecService(), this ); DECODER.decode( bb, container ); return this; } }
int flagsLength = BerValue.getNbBytes( AdDirSyncFlag.getBitmask( getFlags() ) ); adDirSyncLength = 1 + TLV.getNbBytes( flagsLength ) + flagsLength; int maxReturnLengthLength = BerValue.getNbBytes( getMaxReturnLength() ); adDirSyncLength += 1 + TLV.getNbBytes( maxReturnLengthLength ) + maxReturnLengthLength; byte[] cookie = getCookie();
/** * {@inheritDoc} */ @Override public void setFlags( Set<AdDirSyncFlag> flags ) { getDecorated().setFlags( flags ); }
/** * {@inheritDoc} */ @Override public CodecControl<AdDirSync> newCodecControl() { return new AdDirSyncDecorator( codec ); }
int flagsLength = BerValue.getNbBytes( AdDirSyncFlag.getBitmask( getFlags() ) ); adDirSyncLength = 1 + TLV.getNbBytes( flagsLength ) + flagsLength; int maxReturnLengthLength = BerValue.getNbBytes( getMaxReturnLength() ); adDirSyncLength += 1 + TLV.getNbBytes( maxReturnLengthLength ) + maxReturnLengthLength; byte[] cookie = getCookie();
/** * {@inheritDoc} */ @Override public void removeFlag( AdDirSyncFlag flag ) { getDecorated().removeFlag( flag ); }
/** * {@inheritDoc} */ @Override public CodecControl<AdDirSync> newCodecControl( AdDirSync control ) { return new AdDirSyncDecorator( codec, control ); } }
int flagsLength = BerValue.getNbBytes( AdDirSyncFlag.getBitmask( getFlags() ) ); adDirSyncLength = 1 + TLV.getNbBytes( flagsLength ) + flagsLength; int maxReturnLengthLength = BerValue.getNbBytes( getMaxReturnLength() ); adDirSyncLength += 1 + TLV.getNbBytes( maxReturnLengthLength ) + maxReturnLengthLength; byte[] cookie = getCookie();