@MediaClass(uuid1=218169601, uuid2=257, uuid3=16384, uuid4={6,14,43,52,2,6,1,1}, definedName="KLVData", description="The KLVData class contains user data specified with a key (SMPTE label), length, and value.", symbol="KLVData") public class KLVDataImpl extends InterchangeObjectImpl implements KLVData, Serializable, XMLSerializable, Cloneable
Implements a container for user data specified with a key (SMPTE label), length and value. SMPTE KLV's are specified in SMPTE&336M.
The byte order of the KLV data value is the same as the byte order of the byte buffer passed to initialize or set the value.
ObjectClassPropertyID| Constructor and Description |
|---|
KLVDataImpl() |
KLVDataImpl(AUID key,
ByteBuffer value)
Creates and initializes a new KLV data object, which contains
user data specified with a key (SMPTE label), length, and value.
|
KLVDataImpl(ByteBuffer keyAndValue) |
| Modifier and Type | Method and Description |
|---|---|
KLVData |
clone()
Create a cloned copy of this interchange object.
|
String |
getComment()
Include a comment when serializing a value to XML.
|
AUID |
getKey()
Returns the key of this KLV data.
|
byte[] |
getKLVDataValuePersist() |
int |
getLength()
Returns the size of the data buffer for this KLV data, which includes
the key.
|
ByteBuffer |
getValue()
Returns the value of this KLV data, including the key.
|
static ByteBuffer |
initializeKLVDataValue() |
void |
setKLVDataValuePersist(byte[] klvDataValue) |
void |
setValue(ByteBuffer keyAndValue)
Sets the key and data value of the KLV data from the given
byte array.
|
addApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toStringaddApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toStringgetPersistentID, setPersistentIndexappendXMLChildrenpublic KLVDataImpl()
public KLVDataImpl(AUID key, @DataBuffer ByteBuffer value) throws NullPointerException, NotValidKeyException
Creates and initializes a new KLV data object, which contains
user data specified with a key (SMPTE label), length, and value.
The key must have been previously registered using
DictionaryImpl#registerKLVDataKey(AUIDImpl, TypeDefinitionImpl)
in order to use the byte swapping functionality of the type model.
key - Key associated with the data value.value - Value associated with the key.NullPointerException - One or both of the arguments is null.NotValidKeyException - The given key must not resolve to a
built-in type. For most purposes, use TypeDefinitionRenameImpl
to rename an existing type.public KLVDataImpl(@DataBuffer ByteBuffer keyAndValue) throws NullPointerException, IllegalArgumentException
public AUID getKey()
KLVDataReturns the key of this KLV data.
public int getLength()
KLVDataReturns the size of the data buffer for this KLV data, which includes the key.
@MediaProperty(uuid1=50397712, uuid2=512, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="KLVDataValue", aliases="Value", typeName="Opaque", optional=false, uniqueIdentifier=false, pid=20737, symbol="KLVDataValue") public ByteBuffer getValue()
KLVDataReturns the value of this KLV data, including the key.
@MediaPropertySetter(value="KLVDataValue") public void setValue(ByteBuffer keyAndValue) throws NullPointerException, IllegalArgumentException
KLVDataSets the key and data value of the KLV data from the given byte array. The key is assumed to be the first 16 bytes of the value.
setValue in interface KLVDatakeyAndValue - Value to set for the KLV data.NullPointerException - The given buffer for the data value is null.IllegalArgumentException - A buffer is too short. It must contain a key of of 16-bytes.public static final ByteBuffer initializeKLVDataValue()
public KLVData clone()
InterchangeObjectCreate a cloned copy of this interchange object.
clone in interface MediaEntityclone in interface InterchangeObjectclone in interface KLVDataclone in class InterchangeObjectImplpublic String getComment()
XMLSerializableInclude a comment when serializing a value to XML. The comment will be inserted as the first child node of the element representing the class.
getComment in interface XMLSerializablegetComment in class InterchangeObjectImplpublic byte[] getKLVDataValuePersist()
public void setKLVDataValuePersist(byte[] klvDataValue)
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.