5
回答
java 读取html 如何显示在textare

java 读取出html 打印出来是整齐 显示在web textare 格式很乱 

File file = new File(path);
        String temp;

        FileInputStream fis;

        fis = new FileInputStream(file);

        StringBuffer sb = new StringBuffer();
        BufferedReader in = null;

        try {
            in = new BufferedReader(new InputStreamReader(fis, "utf-8"));
            while ((temp = in.readLine()) != null) {
                sb.append(temp);
            }
            in.close();



<无标签>
举报
顶部