从文件中读取一定的字节数, 要求遇到汉字将汉字读取出来并且不能读取一半求高手指点.............

解决方案 »

  1.   

    用字节流即可!
    public static void main(String[] args)throws Exception {
            InputStream is = new FileInputStream("c:/1.txt");
            Reader reader = new InputStreamReader(is);
            int c;
            while ((c = reader.read()) != -1) {
                System.out.print((char) c);
            }
            System.out.println();
        }