
public class KeyValueBag extends RefCounted
An example is the "title" meta-data item in an MP3 file.
Support for KeyValueBag differs depending upon the
Container format you're using and the implementation
in FFmpeg. For example,
MP3 meta-data reading and writing is supported, but
(as of the writing of this comment) FLV meta-data writing
is not supported.
| Modifier and Type | Class and Description |
|---|---|
static class |
KeyValueBag.Flags
Different types of flags that can be passed to KeyValueBag#getValue
|
| Modifier and Type | Method and Description |
|---|---|
KeyValueBag |
copyReference()
Create a new KeyValueBag object that is actually referring to the
exact same underlying native object.
|
boolean |
equals(Object obj)
Compares two values, returning true if the underlying objects in native code are the same object.
|
Collection<String> |
getKeys()
Get the set of keys currently in this
KeyValueBag object
as an unordered collection. |
int |
getNumKeys()
Get the total number of keys currently in this
KeyValueBag object. |
String |
getValue(String key)
Return the value for this key, comparing case insensitively.
|
String |
getValue(String key,
KeyValueBag.Flags flag)
Get the value for the given key.
|
int |
hashCode()
Get a hashable value for this object.
|
static KeyValueBag |
make()
Create a new KeyValueBag bag of properties with
no values set. |
int |
setValue(String key,
String value)
Sets the value for the given key to value.
|
int |
setValue(String key,
String value,
KeyValueBag.Flags flag)
Sets the value for the given key to value.
|
String |
toString()
Return the meta-data, with all values expanded.
|
delete, getCurrentRefCountpublic KeyValueBag copyReference()
copyReference in class RefCountedpublic boolean equals(Object obj)
public int hashCode()
public String toString()
public Collection<String> getKeys()
KeyValueBag object
as an unordered collection.public String getValue(String key)
key - the keypublic int getNumKeys()
public String getValue(String key, KeyValueBag.Flags flag)
key - The keyflag - A flag for how to searchpublic int setValue(String key, String value)
key - The key to set.value - The value to set.public static KeyValueBag make()
public int setValue(String key, String value, KeyValueBag.Flags flag)
key - The key to set.value - The value to set.flag - A flag on how this should be set.Copyright © 2018 Humble Software. All rights reserved.