Class AbstractJarWriter
java.lang.Object
org.springframework.boot.loader.tools.AbstractJarWriter
- All Implemented Interfaces:
- LoaderClassesWriter
- Direct Known Subclasses:
- JarWriter
Abstract base class for JAR writers.
- Since:
- 2.3.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidwriteEntry(String entryName, InputStream inputStream) Writes an entry.voidwriteEntry(String entryName, EntryWriter entryWriter) Writes an entry.voidwriteIndexFile(String location, Collection<String> lines) Write a simple index file containing the specified UTF-8 lines.voidWrite the required spring-boot-loader classes to the JAR.voidwriteLoaderClasses(String loaderJarResourceName) Write the required spring-boot-loader classes to the JAR.voidwriteManifest(Manifest manifest) Write the specified manifest.voidwriteNestedLibrary(String location, Library library) Write a nested library.protected abstract voidwriteToArchive(ZipEntry entry, EntryWriter entryWriter) 
- 
Constructor Details- 
AbstractJarWriterpublic AbstractJarWriter()
 
- 
- 
Method Details- 
writeManifestWrite the specified manifest.- Parameters:
- manifest- the manifest to write
- Throws:
- IOException- of the manifest cannot be written
 
- 
writeEntryWrites an entry. TheinputStreamis closed once the entry has been written- Specified by:
- writeEntryin interface- LoaderClassesWriter
- Parameters:
- entryName- the name of the entry
- inputStream- the stream from which the entry's data can be read
- Throws:
- IOException- if the write fails
 
- 
writeEntryWrites an entry. TheinputStreamis closed once the entry has been written- Parameters:
- entryName- the name of the entry
- entryWriter- the entry writer
- Throws:
- IOException- if the write fails
 
- 
writeNestedLibraryWrite a nested library.- Parameters:
- location- the destination of the library
- library- the library
- Throws:
- IOException- if the write fails
 
- 
writeIndexFileWrite a simple index file containing the specified UTF-8 lines.- Parameters:
- location- the location of the index file
- lines- the lines to write
- Throws:
- IOException- if the write fails
- Since:
- 2.3.0
 
- 
writeLoaderClassesWrite the required spring-boot-loader classes to the JAR.- Specified by:
- writeLoaderClassesin interface- LoaderClassesWriter
- Throws:
- IOException- if the classes cannot be written
 
- 
writeLoaderClassesWrite the required spring-boot-loader classes to the JAR.- Specified by:
- writeLoaderClassesin interface- LoaderClassesWriter
- Parameters:
- loaderJarResourceName- the name of the resource containing the loader classes to be written
- Throws:
- IOException- if the classes cannot be written
 
- 
writeToArchive- Throws:
- IOException
 
 
-