import java.io.IOException;import sun.net.TelnetInputStream;
import sun.net.ftp.FtpClient;
import sun.net.ftp.FtpLoginException;public class myftp {
    
    /**
     * @param args
     */
    static FtpClient myFtp=null;
    static TelnetInputStream inStream = null;    
    
    
    public static void main(String[] args) throws IOException {
        // TODO 自动生成方法存根
        
            myFtp= new FtpClient("202.204.120.69",21);
            myFtp.login("anonymous","anonymous");   // 以给定用户名和密码登录
                        myFtp.sendServer("PASV");
            myFtp.binary();                       // 表示文件以二进制模式传输
            showFileContents();
    }
    public static void showFileContents() {
        int ch;
        StringBuffer buf = new StringBuffer();
        try {
            inStream= myFtp.list();                // 得到主机端当前目录下所有文件和目录的输入数据流
            while ((ch=inStream.read())>=0) {      // 从输入流中读取数据
                buf.append((char)ch);                // 保存数据到缓冲区
            }
            inStream.close();  
            System.out.println(buf);// 关闭输入流
        }
        catch(Exception e) {
            System.out.println("Error: " + e);
        }
    }
    
}
无法输出中文,怎办?