apache-commons-net

Android - FTPS Session Reuse - No field sessionHostPortCache

佐手、 提交于 2021-02-08 08:30:30
问题 I'm developing an application on Android with Android Studio and I want to use FTP to send files to a server. I need to support session reuse since the server is hosted by an hosting service provider and they obviously have session reuse enabled. I found this reflection hack in this post used by many to make make this possible: // adapted from: // https://trac.cyberduck.io/browser/trunk/ftp/src/main/java/ch/cyberduck/core/ftp/FTPClient.java @Override protected void _prepareDataSocket_(final

Download all folders recursively from FTP server in Java

北慕城南 提交于 2021-01-24 13:50:07
问题 I want to download (or if you wanna say synchronize) the whole content of an FTP server with my local directory. I am already able to download the files and create the directories at the "first layer". But I don't know how to realize the subfolders and files in these. I just cant get a working loop. Can someone help me? Thanks in advance. Here's my code so far: FTPFile[] files = ftp.listFiles(); for (FTPFile file : files){ String name = file.getName(); if(file.isFile()){ System.out.println

Download all folders recursively from FTP server in Java

蓝咒 提交于 2021-01-24 13:49:38
问题 I want to download (or if you wanna say synchronize) the whole content of an FTP server with my local directory. I am already able to download the files and create the directories at the "first layer". But I don't know how to realize the subfolders and files in these. I just cant get a working loop. Can someone help me? Thanks in advance. Here's my code so far: FTPFile[] files = ftp.listFiles(); for (FTPFile file : files){ String name = file.getName(); if(file.isFile()){ System.out.println

How to connect to FTPS server with data connection using same TLS session?

痴心易碎 提交于 2021-01-18 04:46:25
问题 Environment: I'm using Sun Java JDK 1.8.0_60 on 64-bit Windows 7, using Spring Integration 4.1.6 (which internally appears to use Apache Commons Net 3.3 for FTPS access). I'm attempting to integrate with our application an automatic download from our client's FTPS server. I've done so successfully with SFTP servers using Spring Integration without any trouble for other clients without issues, but this is the first time a client has required us to use FTPS, and getting it to connect has been

How to connect to FTPS server with data connection using same TLS session?

北战南征 提交于 2021-01-18 04:46:23
问题 Environment: I'm using Sun Java JDK 1.8.0_60 on 64-bit Windows 7, using Spring Integration 4.1.6 (which internally appears to use Apache Commons Net 3.3 for FTPS access). I'm attempting to integrate with our application an automatic download from our client's FTPS server. I've done so successfully with SFTP servers using Spring Integration without any trouble for other clients without issues, but this is the first time a client has required us to use FTPS, and getting it to connect has been

How to connect to FTPS server with reuse sessions?

天涯浪子 提交于 2020-07-19 11:54:06
问题 I am using the Apache Commons FTP library in my android application. I am trying to connect to my FTPS server from my application (using Android Studio) and then upload some files. However when I want to reuse sessions by overiding the method _prepareDataSocket_ from FTPSClient , I always have the same error about : java.lang.NoSuchFieldException: sessionHostPortCache . I have tried with the code from the others posts : How to connect to FTPS server with data connection using same TLS session