public class JarWriter extends AbstractJarWriter implements AutoCloseable
Constructor and Description |
---|
JarWriter(File file)
Create a new
JarWriter instance. |
JarWriter(File file,
LaunchScript launchScript)
Create a new
JarWriter instance. |
JarWriter(File file,
LaunchScript launchScript,
FileTime lastModifiedTime)
Create a new
JarWriter instance. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the writer.
|
protected void |
writeToArchive(ZipEntry entry,
EntryWriter entryWriter) |
writeEntries, writeEntry, writeEntry, writeIndexFile, writeLoaderClasses, writeLoaderClasses, writeManifest, writeNestedLibrary
public JarWriter(File file) throws FileNotFoundException, IOException
JarWriter
instance.file
- the file to writeIOException
- if the file cannot be openedFileNotFoundException
- if the file cannot be foundpublic JarWriter(File file, LaunchScript launchScript) throws FileNotFoundException, IOException
JarWriter
instance.file
- the file to writelaunchScript
- an optional launch script to prepend to the front of the jarIOException
- if the file cannot be openedFileNotFoundException
- if the file cannot be foundpublic JarWriter(File file, LaunchScript launchScript, FileTime lastModifiedTime) throws FileNotFoundException, 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
entriesIOException
- if the file cannot be openedFileNotFoundException
- if the file cannot be foundprotected void writeToArchive(ZipEntry entry, EntryWriter entryWriter) throws IOException
writeToArchive
in class AbstractJarWriter
IOException
public void close() throws IOException
close
in interface AutoCloseable
IOException
- if the file cannot be closed