
package edu.unl.consystlab.ftp;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;


public class FtpUsageDemo
{
	public static void error(String s)
	{
		System.err.println(s);
		System.exit(-1);
	}

	public static void print(String s)
	{
		System.out.println(s);
	}
/*
	public static void main(String[] args)
	{
		try
		{
			FTPClient ftp = new FTPClient("ja34.klaas.nl");
			ftp.debugResponses(true);			
			print("Connected.");
			ftp.login("ja34", "ibm");
			print("Logged in.");
			ftp.setType(FTPTransferType.BINARY);
			String list = ftp.list("*.*");
			if(list==null) list = "<?empty?>";
			print("Listing: \n"+list);
			
			BufferedWriter bw = ftp.putStart("hello_there.txt");
			bw.write("Hello\n");
			bw.write("There\n");
			ftp.putEnd(bw);		
			
			BufferedReader br = ftp.getStart("aiai.doc");
			String input = br.readLine();
			while(input!=null)
			{
				System.out.println("aiai.doc: ["+input+"]");
				input = br.readLine();
			}
			ftp.getEnd(br);
			
		} catch(FTPException e)
		{
			error("FTPException: "+e);
		}
		catch(IOException e)
		{
			   error("IOException: "+e);
		}
	}
 */
}
