com.ptc.wvs.server.util
Class FTP

java.lang.Object
  extended bysun.net.NetworkClient
      extended bysun.net.TransferProtocolClient
          extended bysun.net.ftp.FtpClient
              extended bycom.ptc.wvs.server.util.FTP

public class FTP
extends sun.net.ftp.FtpClient

Gives high level access to the general ftp commands


Field Summary
private static String args1
           
private static String args2
           
private  String cdDir
           
private static String debugMessage
           
private  String pass
           
private  String site
           
private  String user
           
 
Fields inherited from class sun.net.ftp.FtpClient
FTP_PORT, welcomeMsg
 
Fields inherited from class sun.net.TransferProtocolClient
serverResponse
 
Fields inherited from class sun.net.NetworkClient
defaultConnectTimeout, defaultSoTimeout, encoding, serverInput, serverOutput, serverSocket
 
Constructor Summary
FTP(String site)
           
 
Method Summary
 void cd(String dir)
           
 void close()
           
 void directorylist()
           
 void get(String from, String to)
           
private static int getCommand(String prompt)
           
 String getDebugMessage()
           
private  Object getFieldValue(String name)
           
private static String getUserInput(String prompt)
           
private  void help()
           
 void login(String user, String pass)
           
 Vector ls()
           
static void main(String[] args)
           
 void mget(String fromdir, String todir)
           
 void mget(String fromdir, String todir, boolean olonly)
           
 void mget(String fromdir, String todir, boolean olonly, ArrayList typeList, String[] filterList)
           
 void mget(String fromdir, String todir, boolean olonly, ArrayList typeList, String[] filterList, String skipMsg)
           
 void mkdir(String directory)
           
 void mput(String fromdir, String todir)
           
 void put(String from, String to)
           
 String pwd()
           
 void reconnect()
           
 void rm(String directory)
           
 void rmall(String directory)
           
 void rmdir(String directory)
           
private  void setFieldValue(String name, Object val)
           
 
Methods inherited from class sun.net.ftp.FtpClient
append, ascii, binary, cdUp, closeServer, finalize, get, getFtpProxyHost, getFtpProxyPort, getUseFtpProxy, issueCommand, issueCommandCheck, list, matchNonProxyHosts, nameList, noop, openDataConnection, openPassiveDataConnection, openServer, openServer, put, readReply, reInit, rename, system
 
Methods inherited from class sun.net.TransferProtocolClient
getResponseString, getResponseStrings, readServerResponse, sendServer
 
Methods inherited from class sun.net.NetworkClient
doConnect, getLocalAddress, serverIsOpen
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

args1

private static String args1

args2

private static String args2

debugMessage

private static String debugMessage

site

private String site

user

private String user

pass

private String pass

cdDir

private String cdDir
Constructor Detail

FTP

public FTP(String site)
    throws IOException
Method Detail

getDebugMessage

public String getDebugMessage()

close

public void close()
           throws IOException
Throws:
IOException

login

public void login(String user,
                  String pass)
           throws IOException
Throws:
IOException

reconnect

public void reconnect()
               throws IOException
Throws:
IOException

getFieldValue

private Object getFieldValue(String name)

setFieldValue

private void setFieldValue(String name,
                           Object val)

cd

public void cd(String dir)
        throws IOException
Throws:
IOException

mput

public void mput(String fromdir,
                 String todir)
          throws IOException
Throws:
IOException

put

public void put(String from,
                String to)
         throws IOException
Throws:
IOException

mget

public void mget(String fromdir,
                 String todir)
          throws IOException
Throws:
IOException

mget

public void mget(String fromdir,
                 String todir,
                 boolean olonly)
          throws IOException
Throws:
IOException

mget

public void mget(String fromdir,
                 String todir,
                 boolean olonly,
                 ArrayList typeList,
                 String[] filterList)
          throws IOException
Throws:
IOException

mget

public void mget(String fromdir,
                 String todir,
                 boolean olonly,
                 ArrayList typeList,
                 String[] filterList,
                 String skipMsg)
          throws IOException
Throws:
IOException

get

public void get(String from,
                String to)
         throws IOException
Throws:
IOException

directorylist

public void directorylist()
                   throws IOException
Throws:
IOException

pwd

public String pwd()
           throws IOException
Throws:
IOException

mkdir

public void mkdir(String directory)
           throws IOException
Throws:
IOException

rmdir

public void rmdir(String directory)
           throws IOException
Throws:
IOException

rmall

public void rmall(String directory)
           throws IOException
Throws:
IOException

rm

public void rm(String directory)
        throws IOException
Throws:
IOException

ls

public Vector ls()
          throws IOException
Throws:
IOException

getUserInput

private static String getUserInput(String prompt)
                            throws IOException
Throws:
IOException

getCommand

private static int getCommand(String prompt)
                       throws IOException
Throws:
IOException

main

public static void main(String[] args)

help

private void help()