Here you can find the source of getResponse(Socket socket)
public static String getResponse(Socket socket) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.Socket; public class Main { public static String getResponse(Socket socket) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); String response = in.readLine(); return response; }//from www .j a v a2 s. c o m }