Package tv.hd3g.transfertfiles.ftp
Class FTPFileSystem
- java.lang.Object
-
- tv.hd3g.transfertfiles.CommonAbstractFileSystem<FTPFile>
-
- tv.hd3g.transfertfiles.ftp.FTPFileSystem
-
- All Implemented Interfaces:
Closeable,AutoCloseable,AbstractFileSystem<FTPFile>
- Direct Known Subclasses:
FTPESFileSystem
public class FTPFileSystem extends CommonAbstractFileSystem<FTPFile>
-
-
Field Summary
Fields Modifier and Type Field Description protected InetAddresshostprotected intportprotected Stringusername-
Fields inherited from class tv.hd3g.transfertfiles.CommonAbstractFileSystem
timeoutDuration
-
-
Constructor Summary
Constructors Constructor Description FTPFileSystem(InetAddress host, int port, String username, char[] password, boolean passiveMode, String basePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidconnect()booleanequals(Object obj)org.apache.commons.net.ftp.FTPClientgetClient()FTPFilegetFromPath(String path)FTPListinggetFtpListing()InetAddressgetHost()intgetIOBufferSize()65535 bytesStringgetUsername()inthashCode()booleanisAvaliable()booleanisPassiveMode()booleanisReusable()If disconnected, can we re-connect after ?intreusableHashCode()voidsetFtpListing(FTPListing ftpListing)StringtoString()-
Methods inherited from class tv.hd3g.transfertfiles.CommonAbstractFileSystem
getBasePath, getPathFromRelative, getTimeout, setTimeout
-
-
-
-
Field Detail
-
host
protected final InetAddress host
-
port
protected final int port
-
username
protected final String username
-
-
Constructor Detail
-
FTPFileSystem
public FTPFileSystem(InetAddress host, int port, String username, char[] password, boolean passiveMode, String basePath)
-
-
Method Detail
-
isPassiveMode
public boolean isPassiveMode()
-
connect
public void connect()
-
getHost
public InetAddress getHost()
-
getUsername
public String 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
-
setFtpListing
public void setFtpListing(FTPListing ftpListing)
-
getFtpListing
public FTPListing getFtpListing()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classCommonAbstractFileSystem<FTPFile>
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classCommonAbstractFileSystem<FTPFile>
-
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.
-
-