没有使用FTPSClient的回复字符串

时间:2016-09-13 22:39:41

标签: javascript android ftps

当我使用此代码时,我的应用程序连接到服务器,但我没有得到回复字符串。当我连接ftp客户端时,我可以看到消息。

代码:

FTPSClient ftp = new FTPSClient("TLS",false);
try{
    Log.d("DEBUG","CONNECT TO SERVER");
    ftp.connect("domain.com");
    Log.d("DEBUG",ftp.getReplyString());
    if(FTPReply.isPositiveCompletion(reply)) {
        Log.d("DEBUG","CONNECTED");
    }
} catch (SocketException e) {
    System.out.println(e);
} catch (IOException e) {
    System.out.println(e);
}

logcat输出:

09-14 00:29:41.411 8571-8632/com.google.observer D/DEBUG: CONNECT TO SERVER
09-14 00:29:41.471 8571-8636/com.google.observer D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
09-14 00:29:41.741 8571-8636/com.google.observer D/libEGL: eglInitialize EGLDisplay = 0x7fa247a178
09-14 00:29:41.741 8571-8636/com.google.observer I/OpenGLRenderer: Initialized EGL, version 1.4

                                                                   [ 09-14 00:29:41.741  8571: 8636 D/         ]
                                                                   ro.exynos.dss isEnabled: 0
09-14 00:29:41.741 8571-8636/com.google.observer D/mali_winsys: new_window_surface returns 0x3000,  [1440x2560]-format:1
09-14 00:29:41.761 8571-8571/com.google.observer I/InjectionManager: dispatchCreateOptionsMenu :com.google.observer.MainActivity
09-14 00:29:41.761 8571-8571/com.google.observer I/InjectionManager: dispatchPrepareOptionsMenu :com.google.observer.MainActivity
09-14 00:29:41.761 8571-8571/com.google.observer D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
09-14 00:29:41.771 8571-8636/com.google.observer D/libGLESv1: DTS_GLAPI : DTS is not allowed for Package : com.google.observer
09-14 00:29:41.791 8571-8571/com.google.observer I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@dd550b7 time:149560238
09-14 00:29:42.251 8571-8632/com.google.observer D/DEBUG: CONNECTED

我的回复字符串在哪里?

1 个答案:

答案 0 :(得分:0)

Arrays.toString(ftp.getReplyStrings())

是解决方案吗?现在我得到服务器补充