|
|
|
@ -215,16 +215,16 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
|
|
|
|
|
@Override
|
|
|
|
|
public void writeLoaderClasses(String loaderJarResourceName) throws IOException {
|
|
|
|
|
URL loaderJar = getClass().getClassLoader().getResource(loaderJarResourceName);
|
|
|
|
|
JarInputStream inputStream = new JarInputStream(
|
|
|
|
|
new BufferedInputStream(loaderJar.openStream()));
|
|
|
|
|
JarEntry entry;
|
|
|
|
|
while ((entry = inputStream.getNextJarEntry()) != null) {
|
|
|
|
|
if (entry.getName().endsWith(".class")) {
|
|
|
|
|
writeEntry(new JarArchiveEntry(entry),
|
|
|
|
|
new InputStreamEntryWriter(inputStream, false));
|
|
|
|
|
try (JarInputStream inputStream = new JarInputStream(
|
|
|
|
|
new BufferedInputStream(loaderJar.openStream()))) {
|
|
|
|
|
JarEntry entry;
|
|
|
|
|
while ((entry = inputStream.getNextJarEntry()) != null) {
|
|
|
|
|
if (entry.getName().endsWith(".class")) {
|
|
|
|
|
writeEntry(new JarArchiveEntry(entry),
|
|
|
|
|
new InputStreamEntryWriter(inputStream, false));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
inputStream.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|