protected void saveFiles() throws SaveFailureException { try { FileIterator iterator = getArchive().getFilesForSave(); while (iterator.hasNext()) { File aFile = iterator.next(); if (shouldSave(aFile)) save(aFile, iterator); } } catch (IOException iox) { throw new SaveFailureException(CommonArchiveResourceHandler.Error_occurred_iterating_f_EXC_, iox); // = "Error occurred iterating files" } }
/** * @see com.ibm.etools.archive.SaveStrategy */ public void save(File aFile, FileIterator iterator) throws SaveFailureException { if (aFile.isArchive() && shouldIterateOver((Archive) aFile)) save((Archive) aFile); else { InputStream in = null; if (!aFile.isDirectoryEntry()) { try { in = iterator.getInputStream(aFile); } catch (IOException ex) { throw new SaveFailureException(aFile.getURI(), ex); } } save(aFile, in); } }