文本编辑器源文件(java语言)(38) while((line=datain.readLine())!= null){ line+= "\n"; if(input== null) input= line; else input+= line; } }catch(IOException e){ System.out.println("Error in reading file"); } current_t.open(input);try{in.close();}catch(IOException e){System.out.println("e");}} public void write(String fn,String fd){FileOutputStream out= null; File s= new File(fd,fn);try{ out= new FileOutputStream(s); }catch(Exception e) { System.out.println("Unable to open file"); return; }PrintStream psOut=new PrintStream(out);psOut.print(current_t.getText());///try{out.close();}catch(IOException e){System.out.println("e");}}public boolean keyDown(Event evt,int key){ System.out.println(key); switch(key)