private void transferFile() throws IOException, ClassNotFoundException
	{	
		String fileName = (String) senderInput.readObject();
		int bufferLength = (Integer) senderInput.readObject();

		recieverOutput.writeObject(fileName);
		recieverOutput.writeObject(bufferLength);
		
		userInterface.showMessage("File " + fileName + " being recieved");
		
		byte[] buffer = new byte[bufferLength];
		do
		{
			bytesRead = (Integer) senderInput.readObject();
			buffer = (byte []) senderInput.readObject();
			
			recieverOutput.writeObject(bytesRead);
			recieverOutput.writeObject(Arrays.copyOf(buffer, buffer.length));
		} 
		while(bytesRead==buffer.length);
		
		userInterface.showMessage("File " + fileName + " recieved");
	}