JAVA 文件转字节数组转字符串

    public static void main(String[] args) throws IOException {
        byte[] bytes = FileUtils.readFileToByteArray(new File("C://Users//Administrator//Desktop//简单装修合同样本(一).html"));
        System.out.println(new String(bytes));
    }

没错就是这么简单。

posted @ 2017-12-27 14:44  七脉  阅读(439)  评论(0编辑  收藏  举报