public void openServer(String server,int port) throws IOException, UnknownHostException {
  if (serverSocket != null)   closeServer();
  serverSocket=doConnect(server,port);
  try {
    serverOutput=new PrintStream(new BufferedOutputStream(serverSocket.getOutputStream()),true,encoding);
  }
 catch (  UnsupportedEncodingException e) {
    throw new InternalError(encoding + "encoding not found",e);
  }
  serverInput=new BufferedInputStream(serverSocket.getInputStream());
}

public void openServer ( String server , int port ) throws IOException , UnknownHostException { if ( serverSocket != null ) closeServer ( ) ; serverSocket = doConnect ( server , port ) ; try { serverOutput = new PrintStream ( new BufferedOutputStream ( serverSocket . getOutputStream ( ) ) , true , encoding ) ; } catch ( UnsupportedEncodingException e ) { throw new InternalError ( encoding + "encoding not found" , e ) ; } serverInput = new BufferedInputStream ( serverSocket . getInputStream ( ) ) ; }
open a connection to the server .
