| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE_DEFAULT
The default content type - text/plain.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContent()
Returns the content of the resource as a byte array.
|
String |
getContentType()
Getter for the content type.
|
IResourceVersion |
getResourceVersion(int version)
Retrieve a particular version of a given resource.
|
List<IResourceVersion> |
getResourceVersions()
Retrieve all the kept versions of a given resource.
|
boolean |
isBinary()
Getter for binary flag.
|
void |
setContent(byte[] content)
Sets this resource's content.
|
void |
setContent(byte[] content,
boolean isBinary,
String contentType)
Sets this resource's content.
|
static final String CONTENT_TYPE_DEFAULT
byte[] getContent()
throws RepositoryReadException
RepositoryReadException - in case the content cannot be retrievedvoid setContent(byte[] content)
throws RepositoryWriteException
content - the raw contentRepositoryWriteException - the repository write exceptionvoid setContent(byte[] content,
boolean isBinary,
String contentType)
throws RepositoryWriteException
content - the raw contentisBinary - whether it is binarycontentType - the type of the contentRepositoryWriteException - in case the content of the IResource cannot be retrievedboolean isBinary()
String getContentType()
List<IResourceVersion> getResourceVersions() throws RepositoryVersioningException
IResourceVersion for this {link IResource}RepositoryVersioningException - the repository versioning exceptionIResourceVersion getResourceVersion(int version) throws RepositoryVersioningException
version - the exact versionIResourceVersion for this {link IResource} for this versionRepositoryVersioningException - the repository versioning exceptionCopyright © 2010–2018 Eclipse Foundation. All rights reserved.