saker.nest Documentation TaskDoc JavaDoc Packages
public interface ExternalArchive
An archive that was loaded from an external source from the perspective of the saker.nest repository.

External archives are not part of the saker.nest repository, but they are loaded from their associated URIs. Bundles may declare external dependencies in which case they can be loaded and consumed as part of the repository operations.

The contents of the archive may be interpreted in any way suitable for the caller.

This interface is not to be implemented by clients.

saker.nest 0.8.5
Methods
public ExternalArchiveKey
Gets the archive key of this instance.
public default ByteArrayRegion
Gets the full byte array contents of the given entry.
public NavigableSet<String>
Gets the names of entries in this archive.
public byte[]
Gets a hash of the contents of the archive.
public default boolean
Checks if a given entry with the specified name is present in the archive.
public InputStream
Opens a byte input stream to the contents of the entry with the given name.
Gets the archive key of this instance.

The archive key contains the origins of the archive.

The archive key.
Gets the full byte array contents of the given entry.
nameThe name of the entry.
The byte contents.
NullPointerExceptionIf the argument name is null.
IOExceptionIf the entry was not found, or an I/O error occurrs.
public abstract NavigableSet<String> getEntryNames()
Gets the names of entries in this archive.

Directory entries are not included.

The hasEntry(String) method will return true for any entry name contained in the returned set.

An immutable set of entry names.
public abstract byte[] getHash()
Gets a hash of the contents of the archive.

The hash is produced by hashing the raw byte contents of the archive itself. If the archive was compressed, the contents are not uncompressed for hashing.

The hash algorithm is implementation dependent. It is the same as used by NestRepositoryBundle.getHash().

The hash. Modifications don't propagate, the array is cloned.
public default boolean hasEntry(String name)
Checks if a given entry with the specified name is present in the archive.

If the argument is null, this method returns false.

nameThe name.
true if the entry is present.
Opens a byte input stream to the contents of the entry with the given name.

The returned stream must be closed by the caller.

nameThe name of the entry.
The input stream to the contents of the entry.
NullPointerExceptionIf the argument name is null.
IOExceptionIf the entry was not found, or an I/O error occurrs.