public class ConfigBeanArchive extends AbstractReadableArchive
archiveMetaData, extraData, parentArchive| Constructor and Description |
|---|
ConfigBeanArchive(javax.enterprise.deploy.model.DeployableObject deployObject)
Creates a new instance of ConfigBeanArchive
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the abstract archive
|
void |
closeEntry() |
void |
closeEntry(OutputStream os)
close a previously returned @see java.io.OutputStream returned
by an addEntry call
|
void |
closeEntry(ReadableArchive os)
close a previously returned @see java.io.OutputStream returned
by an addEntry call
|
boolean |
delete()
delete the archive
|
Enumeration |
entries()
Returns an enumeration of the module file entries.
|
Enumeration<String> |
entries(String prefix)
Returns an enumeration of the module file entries with the
specified prefix.
|
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()
Returns the size of the archive.
|
String |
getArchiveUri() |
Collection<String> |
getDirectories()
Returns the enumeration of first level directories in this
archive
|
InputStream |
getEntry(String name)
Returns the InputStream for the given entry name
The file name must be relative to the root of the module.
|
long |
getEntrySize(String name)
Returns the entry size for a given entry name or 0 if not known
|
Manifest |
getManifest()
Returns the manifest information for this archive
|
String |
getName()
Returns the name of the archive.
|
ReadableArchive |
getSubArchive(String name)
create or obtain a subarchive within this abstraction.
|
URI |
getURI()
Returns the path used to create or open the underlying archive
|
boolean |
isDirectory(String name)
Returns true if the entry is a directory or a plain file
|
void |
open(URI uri)
Open an abstract archive
|
boolean |
renameTo(String name)
rename the archive
|
boolean |
supportsElementsOverwriting() |
addArchiveMetaData, getArchiveMetaData, getExtraData, getParentArchive, removeArchiveMetaData, removeExtraData, setExtraData, setParentArchivepublic ConfigBeanArchive(javax.enterprise.deploy.model.DeployableObject deployObject)
public void close()
throws IOException
IOExceptionpublic void closeEntry(ReadableArchive os) throws IOException
the - output stream to closeIOExceptionpublic void closeEntry(OutputStream os) throws IOException
the - output stream to closeIOExceptionpublic boolean delete()
public Enumeration entries()
Archivepublic Enumeration<String> entries(String prefix)
Archiveprefix - the prefix of entries to be includedpublic Collection<String> getDirectories() throws IOException
ArchiveIOExceptionpublic boolean isDirectory(String name)
Archivename - name is one of the entries returned by Archive.entries()public String getName()
ArchiveImplementations should not return null.
public boolean exists()
public boolean exists(String name) throws IOException
ReadableArchivename - the file name relative to the root of the module.IOExceptionpublic String getArchiveUri()
public long getEntrySize(String name)
ReadableArchivename - the entry namepublic void open(URI uri) throws IOException
ReadableArchiveuri - path to the archiveIOExceptionpublic long getArchiveSize()
throws NullPointerException,
SecurityException
ArchiveNullPointerExceptionSecurityExceptionpublic ReadableArchive getSubArchive(String name) throws IOException
the - name of the subarchive.IOExceptionpublic InputStream getEntry(String name) throws IOException
ReadableArchivethe - entry nameIOExceptionpublic Manifest getManifest() throws IOException
ArchiveIOExceptionpublic boolean renameTo(String name)
name - the archive namepublic boolean supportsElementsOverwriting()
public void closeEntry()
throws IOException
IOExceptionpublic URI getURI()
Archive
TODO: abstraction breakage:
Several callers, most notably DeploymentContext.getSourceDir()
implementation, assumes that this URI is an URL, and in fact file URL.
If this needs to be URL, use of URI is misleading. And furthermore,
if its needs to be a file URL, this should be File.
Copyright © 2017. All rights reserved.