public final class PsshAtomUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
buildPsshAtom(java.util.UUID uuid,
byte[] data)
Builds a PSSH atom for a given
UUID containing the given scheme specific data. |
static byte[] |
parseSchemeSpecificData(byte[] atom,
java.util.UUID uuid)
Parses the scheme specific data from a PSSH atom.
|
static java.util.UUID |
parseUuid(byte[] atom)
Parses the UUID from a PSSH atom.
|
public static byte[] buildPsshAtom(java.util.UUID uuid, byte[] data)
UUID
containing the given scheme specific data.uuid
- The UUID of the scheme.data
- The scheme specific data.public static java.util.UUID parseUuid(byte[] atom)
The UUID is only parsed if the data is a valid PSSH atom.
atom
- The atom to parse.public static byte[] parseSchemeSpecificData(byte[] atom, java.util.UUID uuid)
The scheme specific data is only parsed if the data is a valid PSSH atom matching the given UUID, or if the data is a valid PSSH atom of any type in the case that the passed UUID is null.
atom
- The atom to parse.uuid
- The required UUID of the PSSH atom, or null to accept any UUID.