This eventually worked:
SSLSocketFactory fact = HttpsURLConnection.getDefaultSSLSocketFactory();
Is there any reason that SSLSocketFactory.getDefault() would not return the same socket factory as HttpsURLConnection?
In the end I had to explicitly set { "TLSv1", "SSLv3"} as the socket protocols or it would try and connect using SSLv2Hello.
[Message sent by forum member 'suggarglider' (suggarglider)]
http://forums.java.net/jive/thread.jspa?messageID=321943