public void save() { try { if(fd.getFile()!=null) { filename = fd.getFile(); path = fd.

getDirectory(); file = new File(path,filename); file.createNewFile(); } if(file!=null) { String chara1 = t.getText(); char b[]; b =chara1.toCharArray(); FileOutputStream fos = new FileOutputStream(file ,false); for(int i=0;i<b.length;i++) { fos.write(b[i]); } chara1 = null; b=null; savefile=true; } } catch(Exception e) { e.printStackTrace(); } }

Sign up to vote on this title
UsefulNot useful