public class ResourceStreamAccessorImpl extends AbstractTypedElementAdapter implements IStreamContentAccessor
IStreamContentAccessor
for resources.FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE| Constructor and Description |
|---|
ResourceStreamAccessorImpl(AdapterFactory adapterFactory,
Resource resource)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getContents()
Returns an open
InputStream for this object which can be used to retrieve the object's
content. |
org.eclipse.swt.graphics.Image |
getImage()
Returns an image for this object.
|
String |
getName()
Returns the name of this object.
|
String |
getType()
Returns the type of this object.
|
getAdapterFactory, getItemDelegator, getRootAdapterFactorypublic ResourceStreamAccessorImpl(AdapterFactory adapterFactory, Resource resource)
adapterFactory - the adapater factory used to create the accessor.resource - the Resource to associate with the accessor.public String getName()
getName in interface ITypedElementITypedElement.getName()public org.eclipse.swt.graphics.Image getImage()
getImage in interface ITypedElementnull if this type of input has no imageITypedElement.getImage()public String getType()
FOLDER_TYPE. The type is used for determining a suitable viewer
for this object.getType in interface ITypedElementITypedElement.getType()public InputStream getContents() throws org.eclipse.core.runtime.CoreException
InputStream for this object which can be used to retrieve the object's
content. The client is responsible for closing the stream when finished. Returns null if
this object has no streamable contents.getContents in interface IStreamContentAccessororg.eclipse.core.runtime.CoreException - if the contents of this object could not be accessedIStreamContentAccessor.getContents()
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.