ccl.util
Class FTPUtil

java.lang.Object
  |
  +--ccl.util.FTPUtil
All Implemented Interfaces:
Exitable

public class FTPUtil
extends java.lang.Object
implements Exitable

A wrapper of the sun.net.ftp.FtpClient class. This class provides convenience methods for ftp.


Method Summary
static void get(java.lang.String host, java.lang.String user, java.lang.String password, java.lang.String hostfile, java.lang.String localfile)
          Download a file in binary mode.
static void main(java.lang.String[] args_)
          This method provides a service similar to url_get or wget.
static void put(java.lang.String host, java.lang.String user, java.lang.String password, java.lang.String localfile, java.lang.String hostfile)
          Upload a file in binary mode.
 void setExit()
          Implementation of Exitable interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setExit

public void setExit()
Implementation of Exitable interface.

Specified by:
setExit in interface Exitable

main

public static void main(java.lang.String[] args_)
This method provides a service similar to url_get or wget.


get

public static void get(java.lang.String host,
                       java.lang.String user,
                       java.lang.String password,
                       java.lang.String hostfile,
                       java.lang.String localfile)
                throws java.io.IOException
Download a file in binary mode.

Throws:
java.io.IOException - if file transfer fails.

put

public static void put(java.lang.String host,
                       java.lang.String user,
                       java.lang.String password,
                       java.lang.String localfile,
                       java.lang.String hostfile)
                throws java.io.IOException
Upload a file in binary mode.

Throws:
java.io.IOException - if file transfer fails.