org.oddjob.net.ftp
Class FTPGet

java.lang.Object
  extended by org.oddjob.net.ftp.FTPGet
All Implemented Interfaces:
FTPCommand, Stoppable

public class FTPGet
extends Object
implements FTPCommand, Stoppable

Description

FTP command to retrieve a remote file.
Author:
rob

Constructor Summary
FTPGet()
           
 
Method Summary
 boolean executeWith(FTPClient client)
          Execute the command.
 File getFile()
           
 OutputStream getOutput()
           
 String getRemote()
           
 void setFile(File file)
           
 void setOutput(OutputStream output)
           
 void setRemote(String as)
           
 void stop()
          Stop executing.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FTPGet

public FTPGet()
Method Detail

executeWith

public boolean executeWith(FTPClient client)
                    throws IOException
Description copied from interface: FTPCommand
Execute the command.

Specified by:
executeWith in interface FTPCommand
Parameters:
client - The client session.
Returns:
true if OK, false otherwise.
Throws:
IOException

stop

public void stop()
          throws FailedToStopException
Description copied from interface: Stoppable
Stop executing. This method should not return until the Stoppable has actually stopped.

Specified by:
stop in interface Stoppable
Throws:
FailedToStopException

toString

public String toString()
Overrides:
toString in class Object

getRemote

public String getRemote()

setRemote

public void setRemote(String as)

getFile

public File getFile()

setFile

public void setFile(File file)

getOutput

public OutputStream getOutput()

setOutput

public void setOutput(OutputStream output)