fWriter= new PrintWriter(fClientSocket.getOutputStream(), false); fReader= new BufferedReader(new InputStreamReader(fClientSocket.getInputStream()));
try { fWriter= new PrintWriter(new BufferedWriter(new OutputStreamWriter(fClientSocket.getOutputStream(), "UTF-8")), false); } catch (UnsupportedEncodingException e1) { fWriter= new PrintWriter(new BufferedWriter(new OutputStreamWriter(fClientSocket.getOutputStream())), false); } try { fReader= new BufferedReader(new InputStreamReader(fClientSocket.getInputStream(), "UTF-8")); } catch (UnsupportedEncodingException e1) { fReader= new BufferedReader(new InputStreamReader(fClientSocket.getInputStream())); }
	private boolean connect() {		if (fDebugMode)			System.out.println("RemoteTestRunner: trying to connect" + fHost + ":" + fPort); //$NON-NLS-1$ //$NON-NLS-2$		Exception exception= null;		for (int i= 1; i < 20; i++) {			try{				fClientSocket= new Socket(fHost, fPort);				fWriter= new PrintWriter(fClientSocket.getOutputStream(), false/*true*/);				fReader= new BufferedReader(new InputStreamReader(fClientSocket.getInputStream()));				fReaderThread= new ReaderThread();				fReaderThread.start();				return true;			} catch(IOException e){				exception= e;			}			try {				Thread.sleep(2000);			} catch(InterruptedException e) {			}		}		runFailed(JUnitMessages.getFormattedString("RemoteTestRunner.error.connect", new String[]{fHost, Integer.toString(fPort)} )); //$NON-NLS-1$		exception.printStackTrace();		return false;	}