*/
public static void encodeEnumerated( ByteBuffer buffer, int value ) throws EncoderException
{
if ( buffer == null )
{
throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
}
try
{
buffer.put( UniversalTag.ENUMERATED.getValue() );
buffer.put( TLV.getBytes( getNbBytes( value ) ) );
buffer.put( getBytes( value ) );
}
catch ( BufferOverflowException boe )
{
throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
}
}