/** * Compute the AbandonRequest length * <br> * AbandonRequest : * <pre> * 0x50 0x0(1..4) abandoned MessageId * * Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId) * </pre> */ @Override public int computeLength() { return 1 + 1 + BerValue.getNbBytes( getAbandoned() ); } }
/** * Compute the AbandonRequest length * <br> * AbandonRequest : * <pre> * 0x50 0x0(1..4) abandoned MessageId * * Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId) * </pre> */ @Override public int computeLength() { return 1 + 1 + BerValue.getNbBytes( getAbandoned() ); } }
/** * Compute the AbandonRequest length * <br> * AbandonRequest : * <pre> * 0x50 0x0(1..4) abandoned MessageId * * Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId) * </pre> */ @Override public int computeLength() { return 1 + 1 + BerValue.getNbBytes( getAbandoned() ); } }
/** * Encode the Abandon protocolOp part */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The tag buffer.put( LdapCodecConstants.ABANDON_REQUEST_TAG ); // The length. It has to be evaluated depending on // the abandoned messageId value. buffer.put( ( byte ) BerValue.getNbBytes( getAbandoned() ) ); // The abandoned messageId buffer.put( BerValue.getBytes( getAbandoned() ) ); } catch ( BufferOverflowException boe ) { String msg = I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ); throw new EncoderException( msg, boe ); } return buffer; }
/** * Encode the Abandon protocolOp part */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The tag buffer.put( LdapCodecConstants.ABANDON_REQUEST_TAG ); // The length. It has to be evaluated depending on // the abandoned messageId value. buffer.put( ( byte ) BerValue.getNbBytes( getAbandoned() ) ); // The abandoned messageId buffer.put( BerValue.getBytes( getAbandoned() ) ); } catch ( BufferOverflowException boe ) { String msg = I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ); throw new EncoderException( msg, boe ); } return buffer; }
/** * Encode the Abandon protocolOp part */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The tag buffer.put( LdapCodecConstants.ABANDON_REQUEST_TAG ); // The length. It has to be evaluated depending on // the abandoned messageId value. buffer.put( ( byte ) BerValue.getNbBytes( getAbandoned() ) ); // The abandoned messageId buffer.put( BerValue.getBytes( getAbandoned() ) ); } catch ( BufferOverflowException boe ) { String msg = I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ); throw new EncoderException( msg, boe ); } return buffer; }