public class JarWriter
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
void |
close()
Close the writer.
|
void |
writeEntries(java.util.jar.JarFile jarFile)
Write all entries from the specified jar file.
|
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 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 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 close() throws java.io.IOException
java.io.IOException
- if the file cannot be closed