public class JarWriter
extends java.lang.Object
| Constructor | Description |
|---|---|
JarWriter(java.io.File file) |
Create a new
JarWriter instance. |
JarWriter(java.io.File file,
LaunchScript launchScript) |
Create a new
JarWriter instance. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close the writer.
|
void |
writeEntries(java.util.jar.JarFile jarFile) |
Write all entries from the specified jar file.
|
void |
writeEntry(java.lang.String entryName,
java.io.InputStream inputStream) |
Writes an entry.
|
void |
writeLoaderClasses() |
Write the required spring-boot-loader classes to the JAR.
|
void |
writeManifest(java.util.jar.Manifest manifest) |
Write the specified manifest.
|
void |
writeNestedLibrary(java.lang.String destination,
Library library) |
Write a nested library.
|
public JarWriter(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
JarWriter instance.file - the file to writejava.io.IOException - if the file cannot be openedjava.io.FileNotFoundException - if the file cannot be foundpublic JarWriter(java.io.File file,
LaunchScript launchScript)
throws java.io.FileNotFoundException,
java.io.IOException
JarWriter instance.file - the file to writelaunchScript - an optional launch script to prepend to the front of the jarjava.io.IOException - if the file cannot be openedjava.io.FileNotFoundException - if the file cannot be foundpublic void writeManifest(java.util.jar.Manifest manifest)
throws java.io.IOException
manifest - the manifest to writejava.io.IOException - of the manifest cannot be writtenpublic void writeEntries(java.util.jar.JarFile jarFile)
throws java.io.IOException
jarFile - the source jar filejava.io.IOException - if the entries cannot be writtenpublic void writeEntry(java.lang.String entryName,
java.io.InputStream inputStream)
throws java.io.IOException
inputStream is closed once the entry has been writtenentryName - The name of the entryinputStream - The stream from which the entry's data can be readjava.io.IOException - if the write failspublic void writeNestedLibrary(java.lang.String destination,
Library library)
throws java.io.IOException
destination - the destination of the librarylibrary - the libraryjava.io.IOException - if the write failspublic void writeLoaderClasses()
throws java.io.IOException
java.io.IOException - if the classes cannot be writtenpublic void close()
throws java.io.IOException
java.io.IOException - if the file cannot be closedCopyright © 2018. All rights reserved.