title: How to receive and read directory listing from server talking ftp protocol from java program? (Without FTPClient Class)
body: <p>I´m supposed to get this output from my program:</p>
  
  <pre><code>Sending message to server:
  Returned message: 220 (vsFTPd 2.3.5) 
  Sending message to server: USER anonymous
  Returned message: 331 Please specify the password.
  Sending message to server: PASS
  Returned message: 230 Login successful.
  Sending message to server: PASV
  Returned message: 227 Entering Passive Mode (90,130,70,73,114,138)
  Sending message to server: LIST
  Returned message: 150 Here comes the directory listing.
  -rw-r--r--    1 0        0        1073741824000 Feb 19  2016 1000GB.zip
  -rw-r--r--    1 0        0        107374182400 Feb 19  2016 100GB.zip
  ....
  </code></pre>
  
  <p>I´m new to java, im not sure if the problem is on the reception of the directory listing or in the way I´m trying to read it. The thing is that I get the other responses well, but not the directory listing. Here is my output:</p>
  
  <pre><code>Sending message to server: Hello server!
  Returned message: 220 (vsFTPd 2.3.5)
  Sending message to server: USER anonymous
  Returned message: 530 Please login with USER and PASS.
  Sending message to server: PASS
  Returned message: 331 Please specify the password.
  Sending message to server: PASV
  Returned message: 230 Login successful.
  Returned message: 227 Entering Passive Mode (90,130,70,73,86,199).
  Port is: 22215
  Sending message to server: LIST
  </code></pre>
  
  <p>and my code:</p>
  
  <pre><code>System.out.println("Port is: " + getPort(returnedMessage5));
  Socket client2 = new Socket("speedtest.tele2.net",   getPort(returnedMessage5));
  PrintWriter output2 = new PrintWriter(client2.getOutputStream(), true);
  BufferedReader input2 = new BufferedReader(new InputStreamReader(client2.getInputStream()));
  
  System.out.println("Sending message to server: LIST");
  output2.println("LIST");
  String returnedMessage7 = input2.readLine();
  System.out.println("Returned message: " + returnedMessage7);
  System.out.println(returnedMessage7);
  </code></pre>
  
  <p>Thanks in advance and sorry for my english!</p>