Package org.eclipse.core.resources
Interface IStorage
-
- All Superinterfaces:
IAdaptable
- All Known Subinterfaces:
IEncodedStorage,IFile,IFileState
- All Known Implementing Classes:
LocalFileStorage,ZipEntryStorage
public interface IStorage extends IAdaptable
A storage object represents a set of bytes which can be accessed. These may be in the form of anIFileorIFileStateor any other object supplied by user code. The main role of anIStorageis to provide a uniform API for access to, and presentation of, its content.Storage objects implement the
IAdaptableinterface; extensions are managed by the platform's adapter manager.Clients may implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamgetContents()Returns an open input stream on the contents of this storage.IPathgetFullPath()Returns the full path of this storage.StringgetName()Returns the name of this storage.booleanisReadOnly()Returns whether this storage is read-only.-
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
-
-
-
Method Detail
-
getContents
InputStream getContents() throws CoreException
Returns an open input stream on the contents of this storage. The caller is responsible for closing the stream when finished.- 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
IPath getFullPath()
Returns the full path of this storage. The returned value depends on the implementor/extender. A storage need not have a path.- Returns:
- the path related to the data represented by this storage or
nullif none.
-
getName
String getName()
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.- Returns:
- the name of the data represented by this storage,
or
nullif this storage has no name - See Also:
getFullPath()
-
isReadOnly
boolean isReadOnly()
Returns whether this storage is read-only.- Returns:
trueif this storage is read-only
-
-