public abstract class AbstractJarWriter extends Object implements LoaderClassesWriter
| Constructor and Description |
|---|
AbstractJarWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
writeEntry(String entryName,
EntryWriter entryWriter)
Writes an entry.
|
void |
writeEntry(String entryName,
InputStream inputStream)
Writes an entry.
|
void |
writeIndexFile(String location,
Collection<String> lines)
Write a simple index file containing the specified UTF-8 lines.
|
void |
writeLoaderClasses()
Write the required spring-boot-loader classes to the JAR.
|
void |
writeLoaderClasses(String loaderJarResourceName)
Write the required spring-boot-loader classes to the JAR.
|
void |
writeManifest(Manifest manifest)
Write the specified manifest.
|
void |
writeNestedLibrary(String location,
Library library)
Write a nested library.
|
protected abstract void |
writeToArchive(ZipEntry entry,
EntryWriter entryWriter) |
public void writeManifest(Manifest manifest) throws IOException
manifest - the manifest to writeIOException - of the manifest cannot be writtenpublic void writeEntry(String entryName, InputStream inputStream) throws IOException
inputStream is closed once the entry has been writtenwriteEntry in interface LoaderClassesWriterentryName - the name of the entryinputStream - the stream from which the entry's data can be readIOException - if the write failspublic void writeEntry(String entryName, EntryWriter entryWriter) throws IOException
inputStream is closed once the entry has been writtenentryName - the name of the entryentryWriter - the entry writerIOException - if the write failspublic void writeNestedLibrary(String location, Library library) throws IOException
location - the destination of the librarylibrary - the libraryIOException - if the write failspublic void writeIndexFile(String location, Collection<String> lines) throws IOException
location - the location of the index filelines - the lines to writeIOException - if the write failspublic void writeLoaderClasses()
throws IOException
writeLoaderClasses in interface LoaderClassesWriterIOException - if the classes cannot be writtenpublic void writeLoaderClasses(String loaderJarResourceName) throws IOException
writeLoaderClasses in interface LoaderClassesWriterloaderJarResourceName - the name of the resource containing the loader classes
to be writtenIOException - if the classes cannot be writtenprotected abstract void writeToArchive(ZipEntry entry, EntryWriter entryWriter) throws IOException
IOException