title: Send file using socket
body: <p>I have a server application and I want to send a file from this server to some client that is connected to me.</p>
  
  <p>On the client side I don't have any running application, the only thing that  I have is a telnet connection between client and server.</p>
  
  <p>Getting the conection:</p>
  
  <pre><code>Socket cliente = null;
  client = server.accept();
  </code></pre>
  
  <p>Receiving and sending information:</p>
  
  <pre><code>        inClient = client.getInputStream();
          outClient = client.getOutputStream();
          bfClient = new BufferedReader(new InputStreamReader(inClient));
          pwClient = new PrintWriter(outClient, true);
  </code></pre>
  
  <p>The file that I want to send:</p>
  
  <pre><code>File flMacro = new File("macro.txt");
  </code></pre>
  
  <p>I have the file path where I want to save it on the client side.</p>
  
  <p>My problem is: how can I send macro.txt that is in my server to the client, specifying the file path where I want to save it, without any client interaction.</p>