我目前正在使用此:
String content = null;URLConnection connection = null;try { connection = new URL("http://www.google.com").openConnection(); Scanner scanner = new Scanner(connection.getInputStream()); scanner.useDelimiter("\Z"); content = scanner.next(); scanner.close();}catch ( Exception ex ) { ex.printStackTrace();}System.out.println(content);但不确定是否有更好的方法。



