Here you can find the source of getInputStream(Socket socket)
public static InputStream getInputStream(Socket socket)
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.InputStream; import java.net.Socket; public class Main { public static InputStream getInputStream(Socket socket) { try {//from w w w .jav a 2s.co m return socket.getInputStream(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } }