public Link(Socket socket) throws IOException {
  this.socket=socket;
  InputStream is=socket.getInputStream();
  BufferedInputStream bis=new BufferedInputStream(is);
  this.dis=new DataInputStream(bis);
  OutputStream os=socket.getOutputStream();
  BufferedOutputStream bos=new BufferedOutputStream(os);
  this.dos=new LinkOutputStream(bos);
}

public Link ( Socket socket ) throws IOException { this . socket = socket ; InputStream is = socket . getInputStream ( ) ; BufferedInputStream bis = new BufferedInputStream ( is ) ; this . dis = new DataInputStream ( bis ) ; OutputStream os = socket . getOutputStream ( ) ; BufferedOutputStream bos = new BufferedOutputStream ( os ) ; this . dos = new LinkOutputStream ( bos ) ; }
open up a link over a socket .
