@Contract public interface ReadableArchive extends Archive
| Modifier and Type | Method and Description |
|---|---|
void |
addArchiveMetaData(String metaDataKey,
Object metaData) |
boolean |
delete()
deletes the archive
|
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.
|
<T> T |
getArchiveMetaData(String metaDataKey,
Class<T> metadataType) |
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
|
<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 name)
Returns an instance of this archive abstraction for an embedded
archive within this archive.
|
void |
open(URI uri)
Open an abstract archive
|
void |
removeArchiveMetaData(String metaDataKey) |
<U> void |
removeExtraData(Class<U> dataType) |
boolean |
renameTo(String name)
rename the archive
|
<U> void |
setExtraData(Class<U> dataType,
U instance) |
void |
setParentArchive(ReadableArchive parentArchive)
set the parent archive for this archive
|
close, entries, entries, getArchiveSize, getDirectories, getManifest, getName, getURI, isDirectoryInputStream getEntry(String name) throws IOException
name - the file name relative to the root of the module.IOExceptionboolean exists(String name) throws IOException
name - the file name relative to the root of the module.IOExceptionlong getEntrySize(String name)
name - the entry namevoid open(URI uri) throws IOException
uri - path to the archiveIOExceptionReadableArchive getSubArchive(String name) throws IOException
name - is the entry name relative to the root for the archiveIOExceptionboolean exists()
boolean delete()
boolean renameTo(String name)
name - the archive namevoid setParentArchive(ReadableArchive parentArchive)
parentArchive - the parent archiveReadableArchive getParentArchive()
<U> U getExtraData(Class<U> dataType)
dataType - the type of the extra data<U> void setExtraData(Class<U> dataType, U instance)
<U> void removeExtraData(Class<U> dataType)
void removeArchiveMetaData(String metaDataKey)
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.