On the maximal throughput of networks with finite buffers and its application to buffered crossbars