public class JarWriter extends Object
Constructor and Description |
---|
JarWriter(File file)
Create a new
JarWriter instance. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the writer.
|
void |
writeEntries(JarFile jarFile)
Write all entries from the specified jar file.
|
void |
writeEntry(String entryName,
InputStream inputStream)
Writes an entry.
|
void |
writeLoaderClasses()
Write the required spring-boot-loader classes to the JAR.
|
void |
writeManifest(Manifest manifest)
Write the specified manifest.
|
void |
writeNestedLibrary(String destination,
File file)
Write a nested library.
|
public JarWriter(File file) throws FileNotFoundException, IOException
JarWriter
instance.file
- the file to writeIOException
FileNotFoundException
public void writeManifest(Manifest manifest) throws IOException
manifest
- the manifest to writeIOException
public void writeEntries(JarFile jarFile) throws IOException
jarFile
- the source jar fileIOException
public void writeEntry(String entryName, InputStream inputStream) throws 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 readIOException
- if the write failspublic void writeNestedLibrary(String destination, File file) throws IOException
destination
- the destination of the libraryfile
- the library fileIOException
- if the write failspublic void writeLoaderClasses() throws IOException
IOException
public void close() throws IOException
IOException
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.