Class FTPFileSystem

All Implemented Interfaces:
Closeable, AutoCloseable, AbstractFileSystem<FTPFile>
Direct Known Subclasses:
FTPESFileSystem

public class FTPFileSystem extends CommonAbstractFileSystem<FTPFile>
  • Field Details

    • host

      protected final InetAddress host
    • port

      protected final int port
    • username

      protected final String username
  • Constructor Details

    • FTPFileSystem

      public FTPFileSystem(InetAddress host, int port, String username, char[] password, boolean passiveMode, String basePath)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isPassiveMode

      public boolean isPassiveMode()
    • connect

      public void connect()
    • getHost

      public InetAddress getHost()
    • getUsername

      public String getUsername()
    • isReusable

      public boolean isReusable()
      Description copied from interface: AbstractFileSystem
      If 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: AbstractFileSystem
      65535 bytes
    • getFromPath

      public FTPFile getFromPath(String path)
      Parameters:
      path - relative path only
    • setFtpListing

      public void setFtpListing(FTPListing ftpListing)
    • getFtpListing

      public FTPListing getFtpListing()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class CommonAbstractFileSystem<FTPFile>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class CommonAbstractFileSystem<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.