finally {
subJarInputStream.close();
}
}
catch (Exception e) {
throw new ArchiveException( "Error accessing nested jar", e );
}
}
else {
final String entryName = extractName( jarEntry );
final InputStreamAccess inputStreamAccess
= buildByteBasedInputStreamAccess( entryName, jarInputStream );
final String relativeName = extractRelativeName( jarEntry );
final ArchiveEntry entry = new ArchiveEntry() {
@Override
public String getName() {
return entryName;
}
@Override
public String getNameWithinArchive() {
return relativeName;
}
@Override
public InputStreamAccess getStreamAccess() {
return inputStreamAccess;
}
};
context.obtainArchiveEntryHandler( entry ).handleEntry( entry, context );
}
}
jarInputStream.close();
}
catch (IOException ioe) {
throw new ArchiveException(
String.format( "Error accessing JarInputStream [%s]", getArchiveUrl() ),
ioe
);
}
}