⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sftpverification.java

📁 一个JAVA做的FTP软件,带源码的,可以很好的进行二次开发,,并带有详细说明文件的
💻 JAVA
字号:
package net.sf.jftp.net;import com.sshtools.j2ssh.transport.*;import com.sshtools.j2ssh.transport.publickey.*;import net.sf.jftp.*;import net.sf.jftp.util.*;public class SftpVerification extends AbstractKnownHostsKeyVerification{    public SftpVerification(String tmp) throws InvalidHostFileException    {        super(tmp);    }    public void onDeniedHost(final String host)                      throws TransportProtocolException    {        Log.debug("Access to '" + host +                  "' is denied.\nVerify the access granted/denied in the allowed hosts file.");    }    public void onHostKeyMismatch(final String host,                                  SshPublicKey recordedFingerprint,                                  SshPublicKey actualFingerprint)                           throws TransportProtocolException    {        try        {            allowHost(host, actualFingerprint, false);        }        catch(Exception ex)        {            Log.debug("Error: " + ex);        }    }    public void onUnknownHost(final String host, SshPublicKey fingerprint)                       throws TransportProtocolException    {        try        {            allowHost(host, fingerprint, false);        }        catch(Exception ex)        {            Log.debug("Error: " + ex);        }    }    private void showExceptionMessage(Exception ex)    {        Log.debug("Error: " + ex);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -