@Override
	public void writeLoaderClasses(String loaderJarResourceName) throws IOException {
		URL loaderJar = getClass().getClassLoader().getResource(loaderJarResourceName);
		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));
				}
			}
		}
	}
@ Override public void writeLoaderClasses ( String loaderJarResourceName ) throws IOException { URL loaderJar = getClass ( ) . getClassLoader ( ) . getResource ( loaderJarResourceName ) ; 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 ) ) ; } } } }
Write the required spring-boot-loader classes to the JAR.
@param loaderJarResourceName the name of the resource containing the loader classes
to be written
@throws IOException if the classes cannot be written