public static void main(String[] args) throws IOException {
readUTF();
}
//转换流,InputSteamReader读取文本,采用UTF-8编码表,读取文件utf
public static void readUTF()throws IOException{
//创建字节输入流,传递文本文件
FileInputStream fis = new FileInputStream("c:\utf.txt");
//创建转换流对象,构造方法中,包装字节输入流,同时写编码表名
InputStreamReader isr = new InputStreamReader(fis,"UTF-8");
char[] ch = new char[1024];
int len = isr.read(ch);
System.out.println(new String(ch,0,len));
isr.close();
}
public static void main(String[] args) t