|
||||||||||
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
public abstract class AbstractFtpCmdRetr
Abstract base class for RETR command implementations.
Field Summary |
---|
Constructor Summary | |
---|---|
AbstractFtpCmdRetr()
|
Method Summary | |
---|---|
protected abstract void |
doPerformAccessChecks(java.io.File file)
Checks availability and access rights for the current folder and passed file. |
protected abstract void |
doRetrieveFileData(java.io.OutputStream out,
java.io.File file,
long fileOffset)
Retrieves file based data. |
protected abstract void |
doRetrieveRecordData(RecordWriteSupport out,
java.io.File file,
long fileOffset)
Retrieves record based data. |
void |
execute()
Executes the command. |
long |
getCompleted()
Getter method for the java bean completed . |
long |
getFileSize()
Getter method for the java bean fileSize . |
TransferRateLimiter |
getTransferRateLimiter()
Getter Methode fuer die Eigenschaft transferRateLimiter . |
boolean |
handleAsyncCmd(java.lang.String req)
Handles any request on the control connection that was sent while the current command is executed. For instance, while storing or retrieving the client may issue an abort or status command. |
void |
incCompleted(long completed)
Setter method for the java bean completed . |
protected boolean |
isAbortRequested()
|
void |
setFileSize(long fileSize)
Setter method for the java bean fileSize . |
void |
setTransferRateLimiter(TransferRateLimiter transferRateLimiter)
|
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 |
Methods inherited from interface net.sf.hermesftp.cmd.FtpCmd |
---|
getHelp, isAuthenticationRequired |
Constructor Detail |
---|
public AbstractFtpCmdRetr()
Method Detail |
---|
protected abstract void doPerformAccessChecks(java.io.File file) throws java.io.IOException
execute(boolean)
;
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 abstract void doRetrieveRecordData(RecordWriteSupport out, 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).
out
- 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 abstract void doRetrieveFileData(java.io.OutputStream out, java.io.File file, long fileOffset) throws java.io.IOException
execute()
;
out
- 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.public boolean handleAsyncCmd(java.lang.String req)
handleAsyncCmd
in interface FtpCmd
handleAsyncCmd
in class AbstractFtpCmd
req
- The request that has to be handled.
public void execute() throws FtpCmdException
execute
in interface FtpCmd
FtpCmdException
- Thrown on any exception occuring while the command is executed.protected boolean isAbortRequested()
public long getCompleted()
completed
.
completed
.public void incCompleted(long completed)
completed
.
completed
- The value of completed to set.public long getFileSize()
fileSize
.
fileSize
.public void setFileSize(long fileSize)
fileSize
.
fileSize
- The value of fileSize to set.public TransferRateLimiter getTransferRateLimiter()
transferRateLimiter
.
transferRateLimiter
.public void setTransferRateLimiter(TransferRateLimiter transferRateLimiter)
transferRateLimiter
- the transferRateLimiter to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |