EAS-BOS开发问题解决
if (result != KDFileChooser.APPROVE_OPTION) return;
File f = m_chooserSave.getSelectedFile();
//appendToExcel(f.getAbsolutePath()+f.getName()+".xls",true,true,getUITitle
//appendToTxt( f.getAbsolutePath()+".txt" ); String fileName ="";
if( f.getAbsolutePath().endsWith( ".txt" ) ){ }
if(f.exists()) {
fileName = f.getAbsolutePath();
fileName = f.getAbsolutePath() + ".txt";
}else{
());
if(MsgBox.showConfirm2(EASResource.getString(OrgInnerUtils.strResource + "FILE_IS_EXIST")) !=0){
}
return;
} appendToTxt( fileName,false ); MsgBox.showInfo( EASResource.getString(ExportTxtResourceURL + "EXPORT_TXT_SUCC" ) + fileName );
如何导出TXT文本?
分析:
建立一个FileOutputStream。
解决:
public void appendToTxt( String fileName ,String strTxt){
FileOutputStream fos = null; try{ fos = new FileOutputStream(fileName); fos.write(strTxt.getBytes()); }catch(IOException e){}
finally{ try{
fos.close(); }catch(IOException e1){}
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库EAS-BOS开发问题解决(15)在线全文阅读。
相关推荐: