Class SendFileCommand

    • Constructor Detail

      • SendFileCommand

        public SendFileCommand()
    • Method Detail

      • getFile

        public java.io.File getFile()
      • getContentStream

        public java.io.InputStream getContentStream()
                                             throws java.io.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:
        java.io.IOException
      • setFile

        public void setFile​(java.io.File file)
      • getTofile

        public java.lang.String getTofile()
      • setTofile

        public void setTofile​(java.lang.String tofile)
      • getTodir

        public java.lang.String getTodir()
      • setTodir

        public void setTodir​(java.lang.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,
                               java.io.InputStream content)
                        throws java.lang.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:
        java.lang.Throwable