Class SendFileCommand
- java.lang.Object
-
- net.sf.antcontrib.antserver.commands.AbstractCommand
-
- net.sf.antcontrib.antserver.commands.SendFileCommand
-
- All Implemented Interfaces:
java.io.Serializable
,Command
public class SendFileCommand extends AbstractCommand implements Command
Place class description here.- Since:
- Author:
- Matthew Inger,
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SendFileCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute(org.apache.tools.ant.Project project, long contentLength, java.io.InputStream content)
Execute the command.long
getContentLength()
Is there additional content being sent from the local machine to the remote serverjava.io.InputStream
getContentStream()
Gets the content's input stream.java.io.File
getFile()
java.lang.String
getTodir()
java.lang.String
getTofile()
void
setFile(java.io.File file)
void
setTodir(java.lang.String todir)
void
setTofile(java.lang.String tofile)
void
validate(org.apache.tools.ant.Project project)
This should throw a build exception if the parameters are invalid.-
Methods inherited from class net.sf.antcontrib.antserver.commands.AbstractCommand
getReponseContentStream, getResponseContentLength, respond
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.antcontrib.antserver.Command
getReponseContentStream, getResponseContentLength, respond
-
-
-
-
Method Detail
-
getFile
public java.io.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 interfaceCommand
- Overrides:
getContentLength
in classAbstractCommand
-
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 interfaceCommand
- Overrides:
getContentStream
in classAbstractCommand
- 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.
-
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.
-
-