|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IContentObject
IContentObject defines the HQME VSD plugin's content object interface. IContentObject provides an abstract interface for an application to query and access ContentObject within VSD(Virtual Storage Device).
Nested Class Summary | |
---|---|
static class |
IContentObject.Stub
Local-side IPC implementation stub class. |
Method Summary | |
---|---|
int |
close()
Close the ContentObject for further reading or writing. |
java.lang.String |
getProperty(java.lang.String key)
Retrieve specific metadata information, key/value pair, associated with a content object. |
java.lang.String[] |
getPropertyKeys()
Retrieve the current content object property keys. |
java.lang.String |
getStreamingUri()
Retrieve the ContentObject streaming URI by the Streaming Server |
int |
open(java.lang.String mode,
boolean lock)
Opens the ContentObject for further IO operations. |
Property[] |
properties()
Retrieve all properties associated with the content object. |
int |
read(byte[] buf,
int count)
Retrieve data from the ContentObject. |
int |
remove()
Remove the ContentObject and associated metadata/data. |
int |
removeProperty(java.lang.String key)
Remove a metadata key associated with a Content Object |
long |
seek(long offset,
int seekFrom)
Set the current position for the ContentObject IO operation |
int |
setProperty(java.lang.String key,
java.lang.String value)
Set a metadata key associated with a Content Object |
long |
size()
Retrieve the size of the ContentObject in bytes |
long |
tell()
Retrieve the current offset used for reads and writes, related to the beginning of the ContentObject. |
int |
write(byte[] buf,
int count)
Update the ContentObject data. |
Method Detail |
---|
Property[] properties() throws android.os.RemoteException
android.os.RemoteException
java.lang.String[] getPropertyKeys() throws android.os.RemoteException
android.os.RemoteException
java.lang.String getProperty(java.lang.String key) throws android.os.RemoteException
key
- Property key.
The mandatory properties must be supported by all VSDs: "S_STORE_NAME" Describes the name used to store the cached object on the physical media. "S_STORE_SIZE" Describes the size of the cached object in bytes. "S_SOURCEURI" Describes the source Universal Resource Identifier (URI) where this content was obtained from. "S_ORIGIN" The origin (server or app) that the stream originates from. "S_LOCKED" Identified if the stream or content is locked. A locked stream may only be read or written to by its calling origin, regardless of delegated permissions. "S_TYPE" Describes the MIME type of the cached object. "S_REDOWNLOAD_URI" Describes the MIME type of the cached object. ContentObjects also support the following optional properties : "S_POLICY" "S_METADATA" "S_CONTENTPROFILE" "S_VALIDITYCHECK" "S_RIGHTSCHECK"
android.os.RemoteException
int setProperty(java.lang.String key, java.lang.String value) throws android.os.RemoteException
key
- Property key.value
- Property value.
android.os.RemoteException
int removeProperty(java.lang.String key) throws android.os.RemoteException
key
- Property key.
android.os.RemoteException
long size() throws android.os.RemoteException
android.os.RemoteException
long tell() throws android.os.RemoteException
android.os.RemoteException
long seek(long offset, int seekFrom) throws android.os.RemoteException
offset
- The offset to seek to.seekFrom
- Can be one of these values:
SEEK_SET(0): Beginning of object
SEEK_CUR(1): Current position of object
SEEK_END(2): End of object
android.os.RemoteException
int open(java.lang.String mode, boolean lock) throws android.os.RemoteException
mode
- Indicates the desired I/O access operation:
"r" - read only
"rw" - read and write
The behavior is undefined for invalid operation flags.lock
- If the lock argument is set to true, then another application is prohibited
from opening the stream associated with a ContentObject. The lock is removed when the
ContentObject is closed.
android.os.RemoteException
int close() throws android.os.RemoteException
android.os.RemoteException
int read(byte[] buf, int count) throws android.os.RemoteException
buf
- Read buffercount
- Number of bytes to read.
android.os.RemoteException
int write(byte[] buf, int count) throws android.os.RemoteException
buf
- Write buffercount
- Number of bytes to write.
android.os.RemoteException
int remove() throws android.os.RemoteException
android.os.RemoteException
java.lang.String getStreamingUri() throws android.os.RemoteException
android.os.RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |