My own file downloader code in java