|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeDefinitionOpaque
Specifies the definition of property values whose type is specified in each instance, providing access to data opaque to this API and manipulated directly by an application through a handle. The data type of the value may be contained in a key (AUID) that is stored with the data itself. To access the data, its type must be known to the application.
Note that many of the methods of TypeDefinitionIndirect are overridden
by opaque-specific versions in the implementation provided by the MAJ API. In this case,
an attempt is made to resolve the type of the opaque data using the assumption that the first
16 bytes represent a key to the data type. To set a dictionary
to used to help with this resolution, call
TypeDefinitionOpaque.setDictionary(Dictionary)
.
makeTypeDefinitionOpaque()
,
TypeCategory.Opaque
,
KLVData
,
KLVDataDefinition
,
Dictionary.registerOpaqueTypeDefinition(TypeDefinition)
,
Dictionary.registerKLVDataKey(AUID, TypeDefinition)
Method Summary | |
---|---|
PropertyValue |
createValueFromHandle(byte[] initialData)
Creates and returns a new opaque property value from the given block of initial data. |
AUID |
getActualTypeID(PropertyValue opaqueProperty)
Returns the type identifier of the actual data within the given opaque property value. |
byte[] |
getHandle(PropertyValue opaqueProperty)
Read and return the given opaque property value without having to know its contents. |
void |
setHandle(PropertyValue opaqueProperty,
byte[] handle)
Sets the value of the given opaque property value to the given unknown data. |
Methods inherited from interface tv.amwa.maj.iface.TypeDefinitionIndirect |
---|
createValueFromActualData, createValueFromActualValue, getActualData, getActualSize, getActualType, getActualValue |
Methods inherited from interface tv.amwa.maj.iface.TypeDefinition |
---|
createValue, getTypeCategory |
Methods inherited from interface tv.amwa.maj.iface.MetaDefinition |
---|
getAUID, getDescription, getName, setDescription, setName |
Method Detail |
---|
AUID getActualTypeID(PropertyValue opaqueProperty) throws NullPointerException, IllegalPropertyValueException
Returns the type identifier of the actual data within the given opaque property value. This method assumes that the type identifier is stored in the first 16 bytes of the opaque data.
opaqueProperty
- Property value as defined by this opaque type
definition.
NullPointerException
- The given opaque property definition is null
.
IllegalPropertyValueException
- The given property value is not defined
by this opaque type definition.Dictionary.lookupKLVDataDefinition(AUID)
,
Dictionary.lookupOpaqueTypeDefinition(AUID)
,
TypeDefinitionIndirect.getActualType(PropertyValue)
@DataBuffer byte[] getHandle(PropertyValue opaqueProperty) throws NullPointerException, IllegalPropertyValueException
Read and return the given opaque property
value without having to know its contents. The returned buffer of
data can be used later by a call to
setHandle(PropertyValue, byte[])
.
opaqueProperty
- Property value containing unknown data to
be returned.
NullPointerException
- The given opaque property value is null
.
IllegalPropertyValueException
- The given property value is not defined
by this opaque type definition.setHandle(PropertyValue, byte[])
,
TypeDefinitionIndirect.getActualData(PropertyValue)
,
TypeDefinitionIndirect.getActualValue(PropertyValue)
void setHandle(PropertyValue opaqueProperty, @DataBuffer byte[] handle) throws NullPointerException, IllegalArgumentException, IllegalPropertyValueException
Sets the value of the given opaque property value to the given unknown
data. This data may have previously been retrieved by a call to
getHandle(PropertyValue)
.
opaqueProperty
- Property value to set the unknown data value for.handle
- Data to set as the value of the given opaque property
value.
NullPointerException
- One or more of the arguments is null
.
IllegalArgumentException
- A handle must contain at least 16 bytes of
data.
IllegalPropertyValueException
- The given property value is not defined
by this opaque type definition.getHandle(PropertyValue)
,
createValueFromHandle(byte[])
PropertyValue createValueFromHandle(@DataBuffer byte[] initialData) throws NullPointerException, IllegalArgumentException
Creates and returns a new opaque property value from the given block of initial data.
initialData
- Buffer containing the handle to use.
NullPointerException
- The given initial data handle is null
.
IllegalArgumentException
- A handle must contain at least
16 bytes of data.setHandle(PropertyValue, byte[])
,
getHandle(PropertyValue)
,
TypeDefinitionIndirect.createValueFromActualData(TypeDefinition, byte[])
,
TypeDefinitionIndirect.createValueFromActualValue(PropertyValue)
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |