Wireless systems comprised of rechargeable nodes have a significantly prolonged lifetime and are sustainable. A distinct characteristic of these systems is the fact that the nodes can harvest energy throughout the duration in which communication takes place. As such, transmission policies of the nodes need to adapt to these harvested energy arrivals. In this paper, we consider optimization of the transmission policy of an energy harvesting transmitter which has a limited battery capacity, communicating in a wireless fading channel. In particular, we identify the optimal offline transmission policies that maximize the number of bits delivered by a deadline, and minimize the transmission completion time of the communication session. We introduce a directional water-filling algorithm which provides a simple and concise interpretation of the necessary optimality conditions as well as energy storage capacity and causality. We solve the throughput maximization problem for the fading channel using the directional water-filling algorithm, which simultaneously adapts to the energy harvested as well as the channel variations in time. We then solve the transmission completion time minimization problem by utilizing its equivalence to its throughput maximization counterpart.