* patterns and didn't match any exclude patterns.
*/
protected void fillMapsFromArchive(Resource src, String encoding,
Map fileEntries, Map matchFileEntries,
Map dirEntries, Map matchDirEntries) {
ArchiveEntry entry = null;
ArchiveInputStream ai = null;
try {
try {
ai = StreamHelper.getInputStream(factory, src, encoding);
if (ai == null) {
ai =
factory.getArchiveStream(new BufferedInputStream(src
.getInputStream()),
encoding);
}
} catch (IOException ex) {
throw new BuildException("problem opening " + src, ex);
}
while ((entry = ai.getNextEntry()) != null) {
if (skipUnreadable && !ai.canReadEntryData(entry)) {
log(Messages.skippedIsUnreadable(entry));
continue;
}
Resource r = builder.buildResource(src, encoding, entry);
String name = entry.getName();
if (entry.isDirectory()) {
name = trimSeparator(name);
dirEntries.put(name, r);
if (match(name)) {
matchDirEntries.put(name, r);
}