I think this works. I mean, I know it works ... I think it does POST.
When you open a URLConnection with a URL that starts with
http:// you actually get a HttpURLConnection, which extends URLConnection.
If you will take a look at the documentation for java.net.HttpURLConnection, specifically the setRequestMethod() method, you will see that GET is the default so you are not doing a POST.
As Axel said, HttpClient is handy for this sort of thing.
Bill