public final class PsshAtomUtil
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
buildPsshAtom(java.util.UUID systemId,
byte[] data)
Builds a version 0 PSSH atom for a given system id, containing the given data.
|
static byte[] |
buildPsshAtom(java.util.UUID systemId,
java.util.UUID[] keyIds,
byte[] data)
Builds a PSSH atom for the given system id, containing the given key ids and data.
|
static boolean |
isPsshAtom(byte[] data)
Returns whether the data is a valid PSSH atom.
|
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.
|
static int |
parseVersion(byte[] atom)
Parses the version from a PSSH atom.
|
public static byte[] buildPsshAtom(java.util.UUID systemId,
byte[] data)
systemId - The system id of the scheme.data - The scheme specific data.public static byte[] buildPsshAtom(java.util.UUID systemId,
java.util.UUID[] keyIds,
byte[] data)
systemId - The system id of the scheme.keyIds - The key ids for a version 1 PSSH atom, or null for a version 0 PSSH atom.data - The scheme specific data.public static boolean isPsshAtom(byte[] data)
data - The data to parse.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 int parseVersion(byte[] atom)
The version 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.