private void sendFile() throws IOException
	{
		file = getFile();
		if(file==null)
			return;
		
		userInterface.displayInfoMessage("\nSending file " + file.getName());
		
		/*
		try
		{
			updateProgressbarLock.lock();
			
			uploadInfo.filesSize += file.length();
		}
		finally
		{
			updateProgressbarLock.unlock();
		}
		*/
		
		output.writeObject(file.getName());
		output.writeObject(BUFFER_SIZE);
		
		FileInputStream fileInputStream = new FileInputStream(file);
		
		byte[] buffer = new byte[BUFFER_SIZE];
		
		//updateProgressBar();
		while((bytesRead = fileInputStream.read(buffer)) > 0)
		{
			output.writeObject(bytesRead);
			output.writeObject(Arrays.copyOf(buffer, buffer.length));
			
			//updateProgressBar();
		}
		
		userInterface.displayInfoMessage("\nFile " + file.getName() + " sent");
	}