This paper studies a class of dynamic buffer management problem with one buffer inserted between two interacting components. Different from many previous studies, the component to be controlled is assumed to have multiple power modes, each of which corresponds to a different data processing rate. The overall system is modeled as a hybrid system and the buffer management problem is formulated as an optimal control problem. The cost function of the proposed problem depends on the switching cost and the size of the continuous state space, making its solutions much more challenging. By exploiting some particular features of the proposed problem, the best mode sequence and the optimal switching instants are characterized analytically using some variational approach. Simulation result shows that the proposed method can save at least 30% of energies compared with another heuristic scheme in several typical situations.