标签:NPU inpu catch while todo stack nal pre AC
http://www.verejava.com/?id=16994667084611
package com.io;
import java.io.*;
public class TestInputStreamReader
{
public static void main(String[] args)
{
InputStream is=null;
try
{
is=new FileInputStream("res/chinese.txt");
//将inputStream 转换成 Reader
Reader reader=new InputStreamReader(is);
int l;
while((l=reader.read())!=-1)
{
System.out.println((char)l);
}
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
is.close();
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
http://www.verejava.com/?id=16994667084611
Java IO流 之 InputStreamReader 字节流转字符流
标签:NPU inpu catch while todo stack nal pre AC
原文地址:https://www.cnblogs.com/verejava/p/9227207.html