Changeset 626:0bbecb3a6499
- Timestamp:
- 10/02/09 11:48:10 (4 years ago)
- Author:
- tgambet
- Branch:
- default
- convert_revision:
- svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@627
- Message:
-
explicit implementation of HttpURLConnection
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r625
|
r626
|
|
| 3 | 3 | import java.io.IOException; |
| 4 | 4 | import java.net.ConnectException; |
| 5 | | import java.net.HttpURLConnection; |
| | 5 | //import java.net.HttpURLConnection; |
| | 6 | import sun.net.www.protocol.http.HttpURLConnection; |
| 6 | 7 | import java.net.MalformedURLException; |
| 7 | 8 | import java.net.SocketTimeoutException; |
| … |
… |
|
| 52 | 53 | throw new UnicornException(Message.Level.ERROR, "$message_unsupported_protocol " + docUrl.getProtocol(), null); |
| 53 | 54 | HttpURLConnection con = (HttpURLConnection) docUrl.openConnection(); |
| | 55 | System.out.println(con.getClass()); |
| 54 | 56 | con.setConnectTimeout(connectTimeOut); |
| 55 | | ((URLConnection) con).connect(); |
| | 57 | con.connect(); |
| 56 | 58 | int responseCode = con.getResponseCode(); |
| 57 | 59 | switch (responseCode) { |