public interface ContentProvider
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getContent(java.lang.String tag)
Returns the content identified by the specified tag
or
null if the tag is unknown to this provider. |
byte[] |
getContentAsBinary(java.lang.String tag)
Returns the binary content identified by the specified tag
or
null if the tag is unknown to this provider
or the content does not have binary format. |
java.lang.String |
getContentAsUTF8(java.lang.String tag)
Returns the string content identified by the specified tag
or
null if the tag is unknown to this provider
or the content does not have string format. |
ContentFormat |
getContentFormat(java.lang.String tag)
Returns the format of the content identfied by the specified tag
or
null if the tag is unknown to this provider. |
java.util.Iterator |
getContentTagIterator()
Returns an iterator over the content tags known to this provider.
|
boolean |
isContentCurrent(java.lang.String tag)
Returns
true if the specified content is considered current
(up-to-date) with respect to its context, e.g. its containing stream. |
void |
putContent(java.lang.String tag,
ContentFormat format,
java.lang.Object content)
Stores content in this provider with the specified tag and format.
|
void |
putContentAsBinary(java.lang.String tag,
byte[] content)
Stores binary content in this provider under the specified tag.
|
void |
putContentAsUTF8(java.lang.String tag,
java.lang.String content)
Stores string content in this provider under the specified tag.
|
void |
removeContent(java.lang.String tag)
Removes any content stored by this provider under the specified tag.
|
java.util.Iterator getContentTagIterator()
ContentFormat getContentFormat(java.lang.String tag)
null if the tag is unknown to this provider.
The format determines the content type.tag - the content tagjava.lang.Object getContent(java.lang.String tag)
null if the tag is unknown to this provider.
The type of the result is determined by the content format.tag - the content tagjava.lang.String getContentAsUTF8(java.lang.String tag)
null if the tag is unknown to this provider
or the content does not have string format.tag - the content tagbyte[] getContentAsBinary(java.lang.String tag)
null if the tag is unknown to this provider
or the content does not have binary format.tag - the content tagvoid putContent(java.lang.String tag,
ContentFormat format,
java.lang.Object content)
null and its type must be compatible with the format.
Any existing content with the same tag is replaced.tag - the content tagformat - the content formatcontent - the contentvoid putContentAsUTF8(java.lang.String tag,
java.lang.String content)
null.tag - the content tagcontent - the contentvoid putContentAsBinary(java.lang.String tag,
byte[] content)
null.tag - the content tagcontent - the contentvoid removeContent(java.lang.String tag)
tag - the content tagboolean isContentCurrent(java.lang.String tag)
true if the specified content is considered current
(up-to-date) with respect to its context, e.g. its containing stream.
Returns false if the content tag is unknown to this provider, or as a hint
that the content may be stale.tag - the content tagtrue if the content is considered to be up to dateCopyright © 2014 Integral Solutions Ltd. All Rights Reserved.