Class ZipEntryStorage

  • All Implemented Interfaces:
    IStorage, IAdaptable

    public class ZipEntryStorage
    extends PlatformObject
    implements IStorage
    Storage implementation for zip entries.

    This class may be instantiated.

    See Also:
    This class is not intended to be subclassed by clients.
    • Constructor Detail

      • ZipEntryStorage

        public ZipEntryStorage​(ZipFile archive,
                               ZipEntry entry)
        Constructs a new storage implementation for the given zip entry in the specified zip file
        archive - zip file
        entry - zip entry
    • Method Detail

      • getContents

        public InputStream getContents()
                                throws CoreException
        Description copied from interface: IStorage
        Returns an open input stream on the contents of this storage. The caller is responsible for closing the stream when finished.
        Specified by:
        getContents in interface IStorage
        an input stream containing the contents of this storage
        CoreException - if the contents of this storage could not be accessed. See any refinements for more information.
      • getFullPath

        public IPath getFullPath()
        Description copied from interface: IStorage
        Returns the full path of this storage. The returned value depends on the implementor/extender. A storage need not have a path.
        Specified by:
        getFullPath in interface IStorage
        the path related to the data represented by this storage or null if none.
      • getName

        public String getName()
        Description copied from interface: IStorage
        Returns the name of this storage. The name of a storage is synonymous with the last segment of its full path though if the storage does not have a path, it may still have a name.
        Specified by:
        getName in interface IStorage
        the name of the data represented by this storage, or null if this storage has no name
        See Also:
      • isReadOnly

        public boolean isReadOnly()
        Description copied from interface: IStorage
        Returns whether this storage is read-only.
        Specified by:
        isReadOnly in interface IStorage
        true if this storage is read-only
      • getArchive

        public ZipFile getArchive()
        Returns the archive containing the zip entry.
        zip file
      • getZipEntry

        public ZipEntry getZipEntry()
        Returns the entry that contains the source
        zip entry
      • hashCode

        public int hashCode()
        hashCode in class Object