I am trying to copy an MP3 from my website to a local file - the following program SOMETIMES!!?? works, sometimes it get so far and then stops -it does not end just sticks at a random point,and i have to cancel the program ( I am using Netbeans), but it does work on the odd occasion?! my main aim to have this in a swing application using swingworker, and to update a status bar etc.....
If you've modified the loop as I suggested, then I don't see anything wrong with your code. Perhaps there is a problem with the network, or with the server you're getting the MP3 file from. Can you download the file from a regular browser?
I was wondering if it was the network - sometimes when I watch a streamed video through BBC's Iplayer, it stops ,then starts again with the sound out of sink with the video, and internet radio sometimes just stops!! - I will try it on a friends network.
If FileZilla has the same problem, the problem is somewhere in the network. Since the problem is not limited to this one server, that problem can be your network card drivers, network card itself, cable, or anything beyond that. Start locally, by reinstalling / updating the network card drivers, then work your way along the line.