어떤 문자 스트림 데이터 잘못된 판독되지
바이트 스트림 데이터가 다르기 때문에 문자 세트 판독 될 수 있고, 다른 글자 크기에 대응하는 각 캐릭터
왜곡 /
= 새의 FileReader (파일 F) 읽기 읽기 또는 경로
작동 :
선택한 문자 배열로 바이트 배열의 흐름을 변경하는 것 외에도, 다른 동일
public class test{
public static void main(String[]args)
{
File f =new File("C:/Users/10853/eclipse-workspace/hell/src/hell/abc");
Reader reader=null;
try {
reader=new FileReader(f);
**char[] flush =new char[1024];**
int len=-1;
try {
while((**len=reader.read(flush))!=-1**)
{//字符数组-->字符串
**String s=new String(flush,0,len);**
System.out.println(s);
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}catch(IOException e)
{
e.printStackTrace();
}finally {
try {
if(null!=reader)
{
reader.close();
}
}catch(IOException e)
{
e.printStackTrace();
}
}
}
}