FileWriter fw=null; FileInputStream fis=null; try { fw = new FileWriter(target); fis = new FileInputStream(source); OutlookFormatter outlf = new OutlookFormatter(convert(fis)); fis.close(); fw.write(outlf.getFormatted()); fw.close(); } catch(FileNotFoundException ex) { throw new ConverterException(ex.getMessage()); } catch(IOException ex) { throw new ConverterException(ex.getMessage()); } finally { if(fw != null) fw.close(); if(fis != null) fis.close(); }