Class FTPS

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, FTP

    public class FTPS
    extends java.lang.Object
    implements FTP
    FTP, FTPS
    • Constructor Summary

      Constructors 
      Constructor Description
      FTPS​(java.net.InetAddress host, int port, java.lang.String user, java.lang.String pass, boolean isFTPS)  
    • Method Summary

      Modifier and Type Method Description
      void close()
      close
      boolean delete​(java.lang.String filename)
      remove file
      void enterAsciiFileMode()
      ASCII FILE MODE
      default : BINARY FILE MODE
      void enterBinaryFileMode()
      BINARY FILE MODE
      default : BINARY FILE MODE
      void enterLocalActiveMode()
      on active mode
      default value : passive mode
      void enterLocalPassiveMode()
      on passive mode
      default value : passive mode
      boolean hasDirectory​(java.lang.String directoryname)
      has directory in path
      boolean hasFile​(java.lang.String filename)
      has file in path
      java.util.List<java.lang.String> listDirectories()
      get directory list in now path
      java.util.List<java.lang.String> listDirectories​(java.util.function.Predicate<java.lang.String> filter)
      get directory list in now path
      java.util.List<java.lang.String> listFiles()
      get file list in now path
      java.util.List<java.lang.String> listFiles​(java.util.function.Predicate<java.lang.String> filter)
      get file list in now path
      boolean mkdir​(java.lang.String createDirectoryName)
      make new directory
      java.lang.String path()
      get now path
      same method path(), pwd()
      boolean path​(java.lang.String pathname)
      move path
      same method path(), cd()
      boolean recv​(java.lang.String remoteFilename, java.io.File localFile)
      recv file
      boolean send​(java.lang.String saveFilename, java.io.File localFile)
      send file
      void setUseEPSVwithIPv4​(boolean selected)
      user Extended Passive Mode with IPv4
      default false
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FTPS

        public FTPS​(java.net.InetAddress host,
                    int port,
                    java.lang.String user,
                    java.lang.String pass,
                    boolean isFTPS)
             throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • enterBinaryFileMode

        public void enterBinaryFileMode()
                                 throws java.io.IOException
        BINARY FILE MODE
        default : BINARY FILE MODE
        Throws:
        java.io.IOException
      • enterAsciiFileMode

        public void enterAsciiFileMode()
                                throws java.io.IOException
        ASCII FILE MODE
        default : BINARY FILE MODE
        Throws:
        java.io.IOException
      • enterLocalPassiveMode

        public void enterLocalPassiveMode()
        on passive mode
        default value : passive mode
      • enterLocalActiveMode

        public void enterLocalActiveMode()
        on active mode
        default value : passive mode
      • setUseEPSVwithIPv4

        public void setUseEPSVwithIPv4​(boolean selected)
        user Extended Passive Mode with IPv4
        default false
        Parameters:
        selected -
      • path

        public boolean path​(java.lang.String pathname)
                     throws java.io.IOException
        Description copied from interface: FTP
        move path
        same method path(), cd()
        Specified by:
        path in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • path

        public java.lang.String path()
                              throws java.io.IOException
        Description copied from interface: FTP
        get now path
        same method path(), pwd()
        Specified by:
        path in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • hasFile

        public boolean hasFile​(java.lang.String filename)
                        throws java.io.IOException
        Description copied from interface: FTP
        has file in path
        Specified by:
        hasFile in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • hasDirectory

        public boolean hasDirectory​(java.lang.String directoryname)
                             throws java.io.IOException
        Description copied from interface: FTP
        has directory in path
        Specified by:
        hasDirectory in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • listFiles

        public java.util.List<java.lang.String> listFiles​(java.util.function.Predicate<java.lang.String> filter)
                                                   throws java.io.IOException
        Description copied from interface: FTP
        get file list in now path
        Specified by:
        listFiles in interface FTP
        Parameters:
        filter - file name filter
        Returns:
        Throws:
        java.io.IOException
      • listFiles

        public java.util.List<java.lang.String> listFiles()
                                                   throws java.io.IOException
        Description copied from interface: FTP
        get file list in now path
        Specified by:
        listFiles in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • listDirectories

        public java.util.List<java.lang.String> listDirectories​(java.util.function.Predicate<java.lang.String> filter)
                                                         throws java.io.IOException
        Description copied from interface: FTP
        get directory list in now path
        Specified by:
        listDirectories in interface FTP
        Parameters:
        filter - file name filter
        Returns:
        Throws:
        java.io.IOException
      • listDirectories

        public java.util.List<java.lang.String> listDirectories()
                                                         throws java.io.IOException
        Description copied from interface: FTP
        get directory list in now path
        Specified by:
        listDirectories in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • delete

        public boolean delete​(java.lang.String filename)
                       throws java.io.IOException
        Description copied from interface: FTP
        remove file
        Specified by:
        delete in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • send

        public boolean send​(java.lang.String saveFilename,
                            java.io.File localFile)
                     throws java.io.IOException
        Description copied from interface: FTP
        send file
        Specified by:
        send in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • recv

        public boolean recv​(java.lang.String remoteFilename,
                            java.io.File localFile)
                     throws java.io.IOException
        Description copied from interface: FTP
        recv file
        Specified by:
        recv in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • mkdir

        public boolean mkdir​(java.lang.String createDirectoryName)
                      throws java.io.IOException
        Description copied from interface: FTP
        make new directory
        Specified by:
        mkdir in interface FTP
        Returns:
        Throws:
        java.io.IOException
      • close

        public void close()
        Description copied from interface: FTP
        close
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface FTP