try {
URL url = new URL("http://www.163.com");
InputStream is = url.openStream();
byte[] buffer = new byte[1024];
int i;
while((i = is.read(buffer)) != -1){
System.out.println(new String(buffer,0,i));
}
} catch (Exception e) {
e.printStackTrace();
}