// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.*;
import java.net.*;

public class FTP {
   public static void main(String[] args) throws Exception {
      URL url=new URL("ftp://arne/index.lis");
      InputStream uis = url.openConnection().getInputStream();
      int n;
      byte[] buf = new byte[4096];
      while ((n=uis.read(buf,0,buf.length))>0) System.out.println(new String(buf, 0, n));
   }
}
