I didn't go through the code thoroughly, but I have two comments.
First, you're referencing an external object,
client. It may make sense, but it also means something could be happening outside the method which is effecting it.
Second, consider using the Linlyn code,
http://www.cs.uwplatt.edu/classes/se273/comm/ftpcomm.html If you use this, be warned, the basic code creates a byte array, and when the array gets filled, it creates a new one, twice the size, and copies thje contents from one to another. In this way, it's very inefficient. If you have any knowledge about the size of the data, you can make it much more efficent with only a few minutes of work.
--Mark