Class SendFileCommand

java.lang.Object
net.sf.antcontrib.antserver.commands.AbstractCommand
net.sf.antcontrib.antserver.commands.SendFileCommand
All Implemented Interfaces:
Serializable, Command

public class SendFileCommand extends AbstractCommand implements Command
Place class description here.
Since:
Author:
Matthew Inger,
See Also:
  • Constructor Details

    • SendFileCommand

      public SendFileCommand()
  • Method Details

    • getFile

      public File getFile()
    • getContentLength

      public long getContentLength()
      Description copied from interface: Command
      Is there additional content being sent from the local machine to the remote server
      Specified by:
      getContentLength in interface Command
      Overrides:
      getContentLength in class AbstractCommand
    • getContentStream

      public InputStream getContentStream() throws IOException
      Description copied from interface: Command
      Gets the content's input stream. Should be called only on the client side for sending the content over the connection
      Specified by:
      getContentStream in interface Command
      Overrides:
      getContentStream in class AbstractCommand
      Returns:
      the content's input stream.
      Throws:
      IOException
    • setFile

      public void setFile(File file)
    • getTofile

      public String getTofile()
    • setTofile

      public void setTofile(String tofile)
    • getTodir

      public String getTodir()
    • setTodir

      public void setTodir(String todir)
    • validate

      public void validate(org.apache.tools.ant.Project project)
      Description copied from interface: Command
      This should throw a build exception if the parameters are invalid.
      Specified by:
      validate in interface Command
    • execute

      public boolean execute(org.apache.tools.ant.Project project, long contentLength, InputStream content) throws Throwable
      Description copied from interface: Command
      Execute the command.
      Specified by:
      execute in interface Command
      Parameters:
      project - The project which is being executed
      Returns:
      If true, the connection will be closed
      Throws:
      Throwable