using sockets to fetch a webpage with java
问题 I'd like to fetch a webpage, just fetching the data (not parsing or rendering anything), just catch the data returned after a http request. I'm trying to do this using the high-level Class Socket of the JavaRuntime Library. I wonder if this is possible since I'm not at ease figuring out the beneath layer used for this two-point communication or I don't know if the trouble is coming from my own system. . Here's what my code is doing: 1) setting the socket. this.socket = new Socket( "www