private void tryConnect(InetSocketAddress dest,int timeout) throws IOException {
  if (isConnected()) {
    disconnect();
  }
  server=doConnect(dest,timeout);
  try {
    out=new PrintStream(new BufferedOutputStream(server.getOutputStream()),true,encoding);
  }
 catch (  UnsupportedEncodingException e) {
    throw new InternalError(encoding + "encoding not found",e);
  }
  in=new BufferedInputStream(server.getInputStream());
}

private void tryConnect ( InetSocketAddress dest , int timeout ) throws IOException { if ( isConnected ( ) ) { disconnect ( ) ; } server = doConnect ( dest , timeout ) ; try { out = new PrintStream ( new BufferedOutputStream ( server . getOutputStream ( ) ) , true , encoding ) ; } catch ( UnsupportedEncodingException e ) { throw new InternalError ( encoding + "encoding not found" , e ) ; } in = new BufferedInputStream ( server . getInputStream ( ) ) ; }
connects to the specified destination .
