[mlpl][SmartBuffer] Add a new method: setIndex().