本帖最后由 不破大地 于 2013-6-3 20:05 编辑
public class exercise
{
public static void main(String[] args) throws IOException
{
BufferedReader bufr=
new BufferedReader(new InputStreamReader(new FileInputStream("E:\\newhope\\bin\\IO\\ioexception.class"),"gbk"));
//为何打印出来的class文件是乱码,换了各种编
//表,但就是打印不出来,怎样才能让java的class文,打印出来哈,等待各位的指教。。。
// OutputStream out=System.out;
BufferedWriter bufw=
new BufferedWriter(new OutputStreamWriter(System.out,"gbk"));
String line=null;
while((line=bufr.readLine())!=null)
{
bufw.write(line);
bufw.newLine();
bufw.flush();
}
bufr.close();
}
}
|