如何將這段代碼寫入線程或AsyncTask?如何將這段代碼寫入一個線程或一個AsyncTask?
JSch jsch = new JSch();
Session session = null;
session = jsch.getSession("******", "*********",22);
session.setConfig("StrictHostKeyChecking", "no");
session.setPassword("******");
session.connect();
Channel channel = session.openChannel("sftp");
channel.connect();
ChannelSftp sftpChannel = (ChannelSftp) channel;
sftpChannel.exit();
session.disconnect();