package IO;
import java.io.FileInputStream;
import java.io.InputStreamReader;
/**
* java.io.IntputStreamWriter
* @author xyk
*
*/
public class IutputStreamWriterDemo {
public static void main(String[] args) throws Exception{
FileInputStream fis= new FileInputStream("osw.txt");
InputStreamReader isr =new InputStreamReader(fis,"GBK");
/*
int d=-1;
while ((d=isr.read())!=-1) {
System.out.print((char)d);
}*/
char[]date =new char[30];
int len=-1;
while ((len=isr.read(date))!=-1) {
System.out.println("实际读取的字符:"+len);
String str =String.valueOf(date);
System.out.println(str);
}
isr.close();
}
}