private void sendFile(ConnectionToClient sender, String receiver, String file) {
        File f = new File(file);
        if (f.canRead()) {
            String file_name = file.substring(file.lastIndexOf('\\') + 1);

            List<String> list = cliendFiles.get(receiver);
            if (!list.isEmpty()) {
                if (list.contains(file_name)) {
                    Thread[] connection_threads = getClientConnections();
                    for (Thread connection_thread : connection_threads) {
                        ConnectionToClient connection_to_client = (ConnectionToClient) connection_thread;
                        if (connection_to_client.getInfo("id").equals(receiver)) {
                            try {
                                BufferedReader reader = new BufferedReader(new FileReader(file));
                                String text;
                                while ((text = reader.readLine()) != null) {
                                    connection_to_client.sendToClient(text + "\n");
                                }
                            } catch (IOException ex) {
                                Logger.getLogger(SimpleChatServer.class.getName()).log(Level.SEVERE, null, ex);
                            }
                        }
                    }
                } else {
                    sender.sendToClient("Given receiver is not registered to receive given file. [Receiver=" + receiver + ", File=" + file_name + "]\n");
                }
            } else {
                sender.sendToClient("Given receiver is not registered for file receiving. [Receiver=" + receiver + "]\n");
            }
        } else {
            ui.display("File cannot read. [File=" + file + "]");
            sender.sendToClient("Given file cannot be read. [File=" + file + "]\n");

        }
    }