public abstract class ReadableArchiveAdapter extends Object implements ReadableArchive
Constructor and Description |
---|
ReadableArchiveAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
addArchiveMetaData(String metaDataKey,
Object metaData) |
void |
close()
closes this archive and releases all resources
|
boolean |
delete()
deletes the archive
|
Enumeration<String> |
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() |
<T> T |
getArchiveMetaData(String metaDataKey,
Class<T> metadataType) |
long |
getArchiveSize()
Returns the size of the archive.
|
Collection<String> |
getDirectories()
Returns the enumeration of first level directories in this
archive
|
long |
getEntrySize(String arg0)
Returns the entry size for a given entry name or 0 if not known
|
<U> U |
getExtraData(Class<U> dataType)
Returns any data that could have been calculated as part of
the descriptor loading.
|
ReadableArchive |
getParentArchive()
get the parent archive of this archive
|
ReadableArchive |
getSubArchive(String arg0)
Returns an instance of this archive abstraction for an embedded
archive within this archive.
|
boolean |
isDirectory(String name)
Returns true if the entry is a directory or a plain file
|
void |
open(URI arg0)
Open an abstract archive
|
void |
removeArchiveMetaData(String metaDataKey) |
<U> void |
removeExtraData(Class<U> dataType) |
boolean |
renameTo(String arg0)
rename the archive
|
<U> void |
setExtraData(Class<U> dataType,
U instance) |
void |
setParentArchive(ReadableArchive parentArchive)
set the parent archive for this archive
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exists, getEntry
getManifest, getName, getURI
public long getEntrySize(String arg0)
ReadableArchive
getEntrySize
in interface ReadableArchive
arg0
- the entry namepublic void open(URI arg0) throws IOException
ReadableArchive
open
in interface ReadableArchive
arg0
- path to the archiveIOException
public ReadableArchive getSubArchive(String arg0) throws IOException
ReadableArchive
getSubArchive
in interface ReadableArchive
arg0
- is the entry name relative to the root for the archiveIOException
public boolean delete()
ReadableArchive
delete
in interface ReadableArchive
public boolean renameTo(String arg0)
ReadableArchive
renameTo
in interface ReadableArchive
arg0
- the archive namepublic void close() throws IOException
Archive
close
in interface Archive
IOException
public long getArchiveSize() throws SecurityException
Archive
getArchiveSize
in interface Archive
SecurityException
public boolean exists()
exists
in interface ReadableArchive
public Enumeration<String> entries()
Archive
public Enumeration<String> entries(String prefix)
Archive
public Collection<String> getDirectories() throws IOException
Archive
getDirectories
in interface Archive
IOException
public boolean isDirectory(String name)
Archive
isDirectory
in interface Archive
name
- name is one of the entries returned by Archive.entries()
public void setParentArchive(ReadableArchive parentArchive)
ReadableArchive
setParentArchive
in interface ReadableArchive
parentArchive
- the parent archivepublic ReadableArchive getParentArchive()
ReadableArchive
getParentArchive
in interface ReadableArchive
public <U> U getExtraData(Class<U> dataType)
ReadableArchive
getExtraData
in interface ReadableArchive
dataType
- the type of the extra datapublic <U> void setExtraData(Class<U> dataType, U instance)
setExtraData
in interface ReadableArchive
public <U> void removeExtraData(Class<U> dataType)
removeExtraData
in interface ReadableArchive
public void addArchiveMetaData(String metaDataKey, Object metaData)
addArchiveMetaData
in interface ReadableArchive
public <T> T getArchiveMetaData(String metaDataKey, Class<T> metadataType)
getArchiveMetaData
in interface ReadableArchive
public void removeArchiveMetaData(String metaDataKey)
removeArchiveMetaData
in interface ReadableArchive
Copyright © 2021. All rights reserved.