Package tv.hd3g.transfertfiles.ftp
Class FTPFileSystem
- All Implemented Interfaces:
Closeable,AutoCloseable,AbstractFileSystem<FTPFile>
- Direct Known Subclasses:
FTPESFileSystem
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final InetAddressprotected final intprotected final StringFields inherited from class tv.hd3g.transfertfiles.CommonAbstractFileSystem
timeoutDuration -
Constructor Summary
ConstructorsConstructorDescriptionFTPFileSystem(InetAddress host, int port, String username, char[] password, boolean passiveMode, String basePath) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected static voidcheckIsPositiveCompletion(int replyCode) voidclose()voidconnect()org.apache.commons.net.ftp.FTPClientgetFromPath(String path) getHost()int65535 bytesbooleanbooleanbooleanIf disconnected, can we re-connect after ?intvoidsetFtpListing(FTPListing ftpListing) toString()Methods inherited from class tv.hd3g.transfertfiles.CommonAbstractFileSystem
equals, getBasePath, getPathFromRelative, getTimeout, hashCode, setTimeoutMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tv.hd3g.transfertfiles.AbstractFileSystem
getFromPath
-
Field Details
-
host
-
port
protected final int port -
username
-
-
Constructor Details
-
FTPFileSystem
public FTPFileSystem(InetAddress host, int port, String username, char[] password, boolean passiveMode, String basePath)
-
-
Method Details
-
toString
-
isPassiveMode
public boolean isPassiveMode() -
afterLogin
- Throws:
IOException
-
connect
public void connect() -
checkIsPositiveCompletion
- Throws:
IOException
-
getHost
-
getUsername
-
isReusable
public boolean isReusable()Description copied from interface:AbstractFileSystemIf disconnected, can we re-connect after ? -
isAvaliable
public boolean isAvaliable() -
close
public void close() -
getClient
public org.apache.commons.net.ftp.FTPClient getClient() -
getIOBufferSize
public int getIOBufferSize()Description copied from interface:AbstractFileSystem65535 bytes -
getFromPath
- Parameters:
path- relative path only
-
setFtpListing
-
getFtpListing
-
reusableHashCode
public int reusableHashCode()- Returns:
- the same code for the same internal engine instance in FileSystem. Can be used for interract two FS and protect the both are not the same.
-