In .Net if I want to upload a file asynchronously I just need to call the UploadFileAsync() instance method of the System.Net.WebClient class, block the main thread until it receives a signal from the waithandle I passed to the UploadFileAsync() method, and then inside an event handler procedure that is invoked once the file has been uploaded, signal the main thread using the same waithandle. The nice thing about uploading files this way is that it's also possible to subscribe an event handler procedure that is invoked each time there is a change in file upload progress.
In Java, is there a straightforward way to achieve similar functionality using the java.net.URLConnection class (or something similar)?