public class JarWriter extends AbstractJarWriter implements java.lang.AutoCloseable
| Constructor and Description |
|---|
JarWriter(java.io.File file)
Create a new
JarWriter instance. |
JarWriter(java.io.File file,
LaunchScript launchScript)
Create a new
JarWriter instance. |
JarWriter(java.io.File file,
LaunchScript launchScript,
java.nio.file.attribute.FileTime lastModifiedTime)
Create a new
JarWriter instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the writer.
|
protected void |
writeToArchive(java.util.zip.ZipEntry entry,
EntryWriter entryWriter) |
writeEntry, writeEntry, writeIndexFile, writeLoaderClasses, writeLoaderClasses, writeManifest, writeNestedLibrarypublic 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 JarWriter(java.io.File file,
LaunchScript launchScript,
java.nio.file.attribute.FileTime lastModifiedTime)
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 jarlastModifiedTime - an optional last modified time to apply to the written
entriesjava.io.IOException - if the file cannot be openedjava.io.FileNotFoundException - if the file cannot be foundprotected void writeToArchive(java.util.zip.ZipEntry entry,
EntryWriter entryWriter)
throws java.io.IOException
writeToArchive in class AbstractJarWriterjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseablejava.io.IOException - if the file cannot be closed