public class ScatteredArchive extends ReadableArchiveAdapter
| Modifier and Type | Class and Description |
|---|---|
static class |
ScatteredArchive.Builder |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes this archive and releases all resources
|
Enumeration<String> |
entries()
Returns an enumeration of the module file entries.
|
Enumeration<String> |
entries(String s)
Returns an enumeration of the module file entries with the
specified prefix.
|
boolean |
exists(String name)
Returns whether or not a file by that name exists
The file name must be relative to the root of the module.
|
Iterable<URL> |
getClassPath()
Get the classpath URLs
|
Collection<String> |
getDirectories()
Returns the enumeration of first level directories in this
archive
|
InputStream |
getEntry(String arg)
Returns the InputStream for the given entry name
The file name must be relative to the root of the module.
|
long |
getEntrySize(String arg)
Returns the entry size for a given entry name or 0 if not known
|
File |
getFile(String name) |
Manifest |
getManifest()
Returns the manifest information for this archive
|
String |
getName()
Returns the name of the archive.
|
File |
getResourcesDir() |
URI |
getURI()
Returns the path used to create or open the underlying archive
TODO: abstraction breakage:
Several callers, most notably
DeploymentContext.getSourceDir()
implementation, assumes that this URI is an URL, and in fact file URL. |
String |
toString() |
ScatteredArchive.Builder.type |
type()
Returns the archive type
|
addArchiveMetaData, delete, exists, getArchiveMetaData, getArchiveSize, getExtraData, getParentArchive, getSubArchive, isDirectory, open, removeArchiveMetaData, removeExtraData, renameTo, setExtraData, setParentArchivepublic Iterable<URL> getClassPath()
public File getResourcesDir()
public InputStream getEntry(String arg) throws IOException
arg - the file name relative to the root of the module.IOExceptionpublic long getEntrySize(String arg)
ReadableArchivegetEntrySize in interface ReadableArchivegetEntrySize in class ReadableArchiveAdapterarg - the entry namepublic boolean exists(String name) throws IOException
name - the file name relative to the root of the module.IOExceptionpublic Enumeration<String> entries()
Currently under construction
entries in interface Archiveentries in class ReadableArchiveAdapterpublic Manifest getManifest() throws IOException
IOExceptionpublic URI getURI()
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.public String getName()
public ScatteredArchive.Builder.type type()
public Enumeration<String> entries(String s)
Currently Not Supported
entries in interface Archiveentries in class ReadableArchiveAdapters - the prefix of entries to be includedpublic Collection<String> getDirectories() throws IOException
ArchivegetDirectories in interface ArchivegetDirectories in class ReadableArchiveAdapterIOExceptionpublic void close()
throws IOException
Archiveclose in interface Archiveclose in class ReadableArchiveAdapterIOExceptionCopyright © 2019. All rights reserved.