|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hermesftp.cmd.AbstractFtpCmd net.sf.hermesftp.cmd.AbstractFtpCmdRetr net.sf.hermesftp.cmd.impl.FtpCmdRetr
public class FtpCmdRetr
RETRIEVE (RETR)
This command causes the server-DTP to transfer a copy of the file, specified in the pathname, to the server- or user-DTP at the other end of the data connection. The status and contents of the file at the server site shall be unaffected.
[Excerpt from RFC-959, Postel and Reynolds]
Field Summary |
---|
Constructor Summary | |
---|---|
FtpCmdRetr()
|
Method Summary | |
---|---|
protected void |
doPerformAccessChecks(java.io.File file)
Checks availability and access rights for the current folder and passed file. |
protected void |
doRetrieveFileData(java.io.OutputStream os,
java.io.File file,
long fileOffset)
Retrieves file based data. |
protected void |
doRetrieveRecordData(RecordWriteSupport rws,
java.io.File file,
long fileOffset)
Retrieves record based data. |
void |
execute()
Executes the command. |
java.lang.String |
getHelp()
Returns a short help text for the command. |
boolean |
isAuthenticationRequired()
Returns whether authentication is needed or not. |
Methods inherited from class net.sf.hermesftp.cmd.AbstractFtpCmdRetr |
---|
getCompleted, getFileSize, getTransferRateLimiter, handleAsyncCmd, incCompleted, isAbortRequested, setFileSize, setTransferRateLimiter |
Methods inherited from class net.sf.hermesftp.cmd.AbstractFtpCmd |
---|
getAbsPath, getAndResetFileOffset, getArguments, getCtx, getPathArg, getPermission, getToken, isResponded, msg, msg, msg, msgOut, msgOut, msgOut, out, setArguments, setCtx, setToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FtpCmdRetr()
Method Detail |
---|
public void execute() throws FtpCmdException
execute
in interface FtpCmd
execute
in class AbstractFtpCmdRetr
FtpCmdException
- Thrown on any exception occuring while the command is executed.public java.lang.String getHelp()
public boolean isAuthenticationRequired()
protected void doPerformAccessChecks(java.io.File file) throws java.io.IOException
execute(boolean)
;
doPerformAccessChecks
in class AbstractFtpCmdRetr
file
- The destination file.
java.io.IOException
- Thrown if one of the following conditions occurred: (1) IO failed or (3)
access rights have been violated or (3) resource limits have been reached.protected void doRetrieveRecordData(RecordWriteSupport rws, java.io.File file, long fileOffset) throws java.io.IOException
execute()
;
Futhermore, text record data must be encoded by an 1-byte character set (ACII, ANSI or
EBCDIC).
doRetrieveRecordData
in class AbstractFtpCmdRetr
rws
- The output stream.file
- The source file.fileOffset
- The file offset.
java.io.IOException
- Thrown if IO fails or if a resource limit has been reached.protected void doRetrieveFileData(java.io.OutputStream os, java.io.File file, long fileOffset) throws java.io.IOException
execute()
;
doRetrieveFileData
in class AbstractFtpCmdRetr
os
- The output stream.file
- The source file.fileOffset
- The file offset.
java.io.IOException
- Thrown if IO fails or if a resource limit has been reached.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |