81,122
社区成员




URL myURL = null;
try {
myURL = new URL("http://maps.google.com/maps/geo?output=xml&key=abcdefg&q=38.9146943,121.612382");
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
URLConnection httpsConn = null;
try {
httpsConn = (URLConnection) myURL.openConnection();
InputStreamReader insr = new InputStreamReader(httpsConn.getInputStream());
int respInt = insr.read();
while (respInt != -1) {
System.out.print((char) respInt);
respInt = insr.read();
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}