Class ZipEntryStorage
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.debug.core.sourcelookup.containers.ZipEntryStorage
- All Implemented Interfaces:
IStorage
,IAdaptable
Storage implementation for zip entries.
This class may be instantiated.
- Since:
- 3.0
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionZipEntryStorage
(ZipFile archive, ZipEntry entry) Constructs a new storage implementation for the given zip entry in the specified zip file -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated, for removal: This API element is subject to removal in a future version.Granting free access to the backing zip file archive is dangerous because a caller could close it prematurely and thus break all subsequent usages.Returns the path of the archive containing the zip entry in the file-system.Returns an open input stream on the contents of this storage.Returns the full path of this storage.getName()
Returns the name of this storage.Returns the entry that contains the sourceint
hashCode()
boolean
Returns whether this storage is read-only.Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Constructor Details
-
ZipEntryStorage
Constructs a new storage implementation for the given zip entry in the specified zip file- Parameters:
archive
- zip fileentry
- zip entry
-
-
Method Details
-
getContents
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 interfaceIStorage
- Returns:
- an input stream containing the contents of this storage
- Throws:
CoreException
- if the contents of this storage could not be accessed. See any refinements for more information.
-
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 interfaceIStorage
- Returns:
- the path related to the data represented by this storage or
null
if none.
-
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. -
isReadOnly
public boolean isReadOnly()Description copied from interface:IStorage
Returns whether this storage is read-only.- Specified by:
isReadOnly
in interfaceIStorage
- Returns:
true
if this storage is read-only
-
getArchive
@Deprecated(forRemoval=true, since="3.22 (removal in 2026-12 or later)") public ZipFile getArchive()Deprecated, for removal: This API element is subject to removal in a future version.Granting free access to the backing zip file archive is dangerous because a caller could close it prematurely and thus break all subsequent usages. Existing callers should use derived methods likegetArchivePath()
orgetContents()
instead, if possible.Returns the archive containing the zip entry.- Returns:
- zip file
-
getArchivePath
Returns the path of the archive containing the zip entry in the file-system.- Returns:
- the zip file's file-system path
- Since:
- 3.22
-
getZipEntry
Returns the entry that contains the source- Returns:
- zip entry
-
equals
-
hashCode
public int hashCode()
-