public HttpReceiveSocket(Socket socket,InputStream in,OutputStream out) throws IOException {
  super(socket,in,out);
  this.in=new HttpInputStream(in != null ? in : socket.getInputStream());
  this.out=(out != null ? out : socket.getOutputStream());
}

public HttpReceiveSocket ( Socket socket , InputStream in , OutputStream out ) throws IOException { super ( socket , in , out ) ; this . in = new HttpInputStream ( in != null ? in : socket . getInputStream ( ) ) ; this . out = ( out != null ? out : socket . getOutputStream ( ) ) ; }
layer on top of a pre - existing socket object , and use specified input and output streams .
