@Service @PerLookup public class MemoryMappedArchive extends JarArchive implements org.glassfish.api.deployment.archive.ReadableArchive
archiveMetaData, extraData, parentArchive| Modifier | Constructor and Description |
|---|---|
protected |
MemoryMappedArchive()
Creates a new instance of MemoryMappedArchive
|
|
MemoryMappedArchive(byte[] bits) |
|
MemoryMappedArchive(InputStream is)
Creates a new instance of MemoryMappedArchive
|
|
MemoryMappedArchive(org.glassfish.api.deployment.archive.ReadableArchive source) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the abstract archive
|
boolean |
delete()
delete the archive
|
Enumeration |
entries() |
Enumeration |
entries(Enumeration embeddedArchives) |
boolean |
exists() |
boolean |
exists(String name)
Returns the existence of the given entry name
The file name must be relative to the root of the module.
|
long |
getArchiveSize()
Get the size of the archive
|
byte[] |
getByteArray() |
Collection<String> |
getDirectories() |
InputStream |
getEntry(String name) |
long |
getEntrySize(String name)
Returns the entry size for a given entry name or 0 if not known
|
JarEntry |
getJarEntry(String name) |
Manifest |
getManifest() |
String |
getName()
Returns the name for the archive.
|
String |
getPath() |
org.glassfish.api.deployment.archive.ReadableArchive |
getSubArchive(String name)
create or obtain an embedded archive within this abstraction.
|
URI |
getURI() |
void |
open(URI uri) |
boolean |
renameTo(String name)
rename the archive
|
void |
setURI(URI uri) |
addArchiveMetaData, entries, getArchiveMetaData, getExtraData, getParentArchive, isDirectory, removeArchiveMetaData, removeExtraData, setExtraData, setParentArchiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected MemoryMappedArchive()
public MemoryMappedArchive(InputStream is) throws IOException
IOExceptionpublic MemoryMappedArchive(byte[] bits)
public MemoryMappedArchive(org.glassfish.api.deployment.archive.ReadableArchive source)
throws IOException
IOExceptionpublic byte[] getByteArray()
public void open(URI uri) throws IOException
open in interface org.glassfish.api.deployment.archive.ReadableArchiveIOExceptionpublic void close()
throws IOException
close in interface org.glassfish.api.deployment.archive.ArchiveIOExceptionpublic boolean delete()
delete in interface org.glassfish.api.deployment.archive.ReadableArchivepublic Enumeration entries()
entries in interface org.glassfish.api.deployment.archive.Archivepublic Collection<String> getDirectories() throws IOException
getDirectories in interface org.glassfish.api.deployment.archive.ArchiveIOExceptionpublic Enumeration entries(Enumeration embeddedArchives)
public boolean exists()
exists in interface org.glassfish.api.deployment.archive.ReadableArchivepublic String getPath()
public long getArchiveSize()
throws NullPointerException,
SecurityException
getArchiveSize in interface org.glassfish.api.deployment.archive.ArchiveNullPointerExceptionSecurityExceptionpublic URI getURI()
getURI in interface org.glassfish.api.deployment.archive.Archivepublic void setURI(URI uri)
public org.glassfish.api.deployment.archive.ReadableArchive getSubArchive(String name) throws IOException
getSubArchive in interface org.glassfish.api.deployment.archive.ReadableArchivename - the name of the embedded archive.IOExceptionpublic boolean exists(String name) throws IOException
exists in interface org.glassfish.api.deployment.archive.ReadableArchiveexists in class JarArchivename - the file name relative to the root of the module.IOExceptionpublic InputStream getEntry(String name) throws IOException
getEntry in interface org.glassfish.api.deployment.archive.ReadableArchivename - the entry nameIOExceptionpublic JarEntry getJarEntry(String name)
getJarEntry in class JarArchivepublic long getEntrySize(String name)
getEntrySize in interface org.glassfish.api.deployment.archive.ReadableArchivename - the entry namepublic Manifest getManifest() throws IOException
getManifest in interface org.glassfish.api.deployment.archive.ArchiveIOExceptionpublic boolean renameTo(String name)
renameTo in interface org.glassfish.api.deployment.archive.ReadableArchivename - the archive namepublic String getName()
For a MemoryMappedArhive there is no name, so an empty string is returned.
getName in interface org.glassfish.api.deployment.archive.ArchivegetName in class JarArchiveCopyright © 2014. All rights reserved.