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 an IFile
or IFileState
or any other object supplied by user code. The main role of an IStorage
is to provide a uniform API for access to, and presentation of, its content.
Storage objects implement the IAdaptable
interface;
extensions are managed by the platform's adapter manager.
Clients may implement this interface.
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
null
if 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
null
if this storage has no name -
See Also:
-
getFullPath()
isReadOnly
boolean isReadOnly()
- Returns whether this storage is read-only.
-
-
-
Returns:
-
true
if this storage is read-only
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.