sftp遇到的一个bug,报错,急求大神解决

ChannelSftp.ls(String directory)方法,使用中会报异常:
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1720)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1526)
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.read(PipedInputStream.java:291)
at com.jcraft.jsch.Channel$MyPipedInputStream.updateReadSide(Channel.java:362)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1543)

public static void downloadSftpFile(String ftpHost, String ftpUserName,

String ftpPassword, int ftpPort, String ftpPath, String localPath,

String fileName) throws JSchException {

Session session = null;

Channel channel = null;

    JSch jsch = new JSch();  
    session = jsch.getSession(ftpUserName, ftpHost, ftpPort);  
    session.setPassword(ftpPassword);  
    session.setTimeout(100000);  
    Properties config = new Properties();  
    config.put("StrictHostKeyChecking", "no");  
    session.setConfig(config);  
    session.connect();  

    channel = session.openChannel("sftp");  
    channel.connect();  
    ChannelSftp chSftp = (ChannelSftp) channel;  

    String ftpFilePath = ftpPath + "/" + fileName;  
    String localFilePath = localPath + File.separatorChar + fileName;  

    try {  
        chSftp.get(ftpFilePath, localPath);  
    } catch (Exception e) {  
        e.printStackTrace();  
        logger.info("download error.");  
    } finally {  
        chSftp.quit();  
        channel.disconnect();  
        session.disconnect();  
    }  

}  

}

参考以上代码 使用
jsch-0.1.54.jar 可以成功