@Service(name="jar") @PerLookup public class OutputJarArchive extends JarArchive implements WritableArchive
| Modifier and Type | Field and Description |
|---|---|
protected ZipOutputStream |
jos |
archiveMetaData, extraData, parentArchive| Constructor and Description |
|---|
OutputJarArchive() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the abstract archive
|
void |
closeEntry()
closes the current entry
|
void |
closeEntry(WritableArchive subArchive)
Close a previously returned sub archive
|
void |
create(URI path)
creates a new abstract archive with the given path
|
WritableArchive |
createSubArchive(String name)
Returns an instance of this archive abstraction for an embedded
archive within this archive.
|
Enumeration |
entries()
Returns an enumeration of the module file entries.
|
Enumeration |
entries(Enumeration embeddedArchives) |
long |
getArchiveSize()
Get the size of the archive
|
Collection<String> |
getDirectories()
Returns the enumeration of first level directories in this
archive
|
protected JarEntry |
getJarEntry(String entryName) |
Manifest |
getManifest()
Returns the manifest information for this archive
|
URI |
getURI()
Returns the path used to create or open the underlyong archive
|
OutputStream |
putNextEntry(String name)
Create a new entry in the archive
|
addArchiveMetaData, entries, exists, getArchiveMetaData, getExtraData, getName, getParentArchive, isDirectory, removeArchiveMetaData, removeExtraData, setExtraData, setParentArchiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitentries, getName, isDirectoryprotected ZipOutputStream jos
public long getArchiveSize()
throws NullPointerException,
SecurityException
getArchiveSize in interface ArchiveNullPointerExceptionSecurityExceptionpublic void close()
throws IOException
close in interface ArchiveIOExceptionprotected JarEntry getJarEntry(String entryName)
getJarEntry in class JarArchivepublic void create(URI path) throws IOException
create in interface WritableArchivepath - the path to create the archiveIOExceptionpublic Enumeration entries()
Archivepublic Collection<String> getDirectories() throws IOException
ArchivegetDirectories in interface ArchiveIOExceptionpublic Enumeration entries(Enumeration embeddedArchives)
public Manifest getManifest() throws IOException
ArchivegetManifest in interface ArchiveIOExceptionpublic URI getURI()
public WritableArchive createSubArchive(String name) throws IOException
WritableArchivecreateSubArchive in interface WritableArchivename - is the entry name relative to the root for the archiveIOExceptionpublic void closeEntry(WritableArchive subArchive) throws IOException
closeEntry in interface WritableArchivesubArchive - output stream to closeIOExceptionpublic OutputStream putNextEntry(String name) throws IOException
WritableArchiveputNextEntry in interface WritableArchivename - the entry nameIOExceptionpublic void closeEntry()
throws IOException
closeEntry in interface WritableArchiveIOExceptionCopyright © 2019. All rights reserved.