private void recieveFile() throws IOException, ClassNotFoundException
	{	
		String fileName = (String)input.readObject();
		FileOutputStream fileOutputStream = new FileOutputStream(fileName);
		
		userInterface.displayInfoMessage("\nFile " + fileName + " being recieved");
		
		/*
		try
		{
			updateProgressBarLock.lock();
			
			downloadInfo.filesSize += (Long) input.readObject();
		}
		finally
		{
			updateProgressBarLock.unlock();
		}
		*/
		
		byte[] buffer = new byte[(Integer)input.readObject()];
		
		//updateProgressBar();
		do
		{
			bytesRead = (Integer)input.readObject();
			buffer = (byte [])input.readObject();
			
			fileOutputStream.write(buffer, 0, bytesRead);
			
			//updateProgressBar();
		}while(bytesRead==buffer.length);
		
		fileOutputStream.close();
		userInterface.displayInfoMessage("\nFile " + fileName + " recieved");
	}