Interface VaultPackage

  • All Superinterfaces:
    java.lang.AutoCloseable, PackageProperties

    @ProviderType
    public interface VaultPackage
    extends PackageProperties, java.lang.AutoCloseable
    Defines a vault package. A vault package is a binary assembled representation of a vault export.

    Note that VaultPackage currently extends from PackageProperties to keep the interface backwards compatible.

    • Method Detail

      • getId

        PackageId getId()
        Returns the id of this package or null if the id can't be determined.
        Specified by:
        getId in interface PackageProperties
        Returns:
        the id of this package.
      • getProperties

        PackageProperties getProperties()
        Returns the properties of this package.
        Returns:
        the properties.
        Since:
        3.1
      • isValid

        boolean isValid()
        Checks if this package is valid.
        Returns:
        true if this package is valid.
      • isClosed

        boolean isClosed()
        Checks if this package is closed.
        Returns:
        true if this package is closed.
      • getMetaInf

        MetaInf getMetaInf()
        Returns the meta inf that was either loaded or specified during build.
        Returns:
        the meta inf or null.
      • getSize

        long getSize()
        Returns the size of the package or -1 if n/a.
        Returns:
        the size
      • getFile

        java.io.File getFile()
        Returns the underlying file or null if not available.
        Returns:
        the file
        Since:
        2.0
      • close

        void close()
        Closes this package and releases underlying data. This will also close the underlying Archive if it has been opened.
        Specified by:
        close in interface java.lang.AutoCloseable
      • getArchive

        Archive getArchive()
        Returns the underlying package archive. This does not need to be closed explicitly but rather is implicitly closed via a call to close().
        Returns:
        the archive or null if already closed