|
|
@ -62,7 +62,8 @@ public class AddressUtils {
|
|
|
|
reader.close();
|
|
|
|
reader.close();
|
|
|
|
return buffer.toString();
|
|
|
|
return buffer.toString();
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
System.out.println("温馨提醒:您的主机已经断网,请您检查主机的网络连接");
|
|
|
|
|
|
|
|
System.out.println("根据IP获取所在位置----------错误消息:"+e.getMessage());
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
if (connection != null) {
|
|
|
|
if (connection != null) {
|
|
|
|
connection.disconnect();
|
|
|
|
connection.disconnect();
|
|
|
|