protected void doProcessElements() throws IOException {
JarFile jarFile;
try {
jarFile = new JarFile( jarUrl.toURI().getSchemeSpecificPart() );
}
catch (IOException ze) {
log.warn( "Unable to find file (ignored): " + jarUrl, ze );
return;
}
catch (URISyntaxException e) {
log.warn( "Malformed url: " + jarUrl, e );
return;
}
Enumeration< ? extends ZipEntry > entries = jarFile.entries();
while ( entries.hasMoreElements() ) {
ZipEntry entry = entries.nextElement();
if ( !entry.isDirectory() ) {
addElement(
entry.getName(),
new BufferedInputStream( jarFile.getInputStream( entry ) ),
new BufferedInputStream( jarFile.getInputStream( entry ) )
);
}
}
}
|