<V extends Visitor> V walkAndReturn(final V visitor)
throws IOException {
for (final ZipEntry entry1 : input1()) {
if (entry1.isDirectory()) continue;
final ZipEntry entry2 = input2().entry(entry1.getName());
final ZipEntrySource source1 =
new ZipEntrySource(entry1, input1());
if (null == entry2)
visitor.visitEntryInFirstFile(source1);
else
visitor.visitEntriesInBothFiles(source1,
new ZipEntrySource(entry2, input2()));
}
for (final ZipEntry entry2 : input2()) {
if (entry2.isDirectory()) continue;
final ZipEntry entry1 = input1().entry(entry2.getName());
if (null == entry1)
visitor.visitEntryInSecondFile(
new ZipEntrySource(entry2, input2()));
}
return visitor;
}