/**
 * Class to test the proggi
 */
 
import java.io.*;
import java.util.*;

class FTPDemo
{
  public static void main( String args[] ) {
    try {

      FTPSession ftp = new FTPSession();

      ftp.debug( true );
      
      ftp.openConnection( "edu.bnhof.de", "sghk0013", "" );

      System.out.println( ftp.printWorkingDirectory() );

   //   System.out.println( ftp.findFileInCurrentDirectory( "eins.html" ) );

      ftp.makeDirectory( "SuperNeu" );
      
      ftp.changeWorkingDirectory( "SuperNeu" );
      
  //    ftp.renameFile( "cropImage.txt", "crop.txt" );
      
      System.out.println( ftp.list() );

      System.out.println( ftp.typeOfOperatingSystem() );
      
      byte[] file = ftp.download( "quelle_java.txt" );
      System.out.println( new String(file) );

      ftp.download( "quelle_java.txt",
        "C:\\Holladio.txt" );

      // ftp.upload( "F:\\Desktop\\freetv510.zip",
      //    "eumel.zip" );

      // ftp.close();
      
      System.out.println( "FIN" );
     //  System.in.read();     // Only for symantec
      
    } catch ( IOException e ){
        System.err.println( "Oho: " + e );  }
  }
}
