@Test public void testBuildPsshAtom() { byte[] schemeData = new byte[]{0, 1, 2, 3, 4, 5}; byte[] psshAtom = PsshAtomUtil.buildPsshAtom(C.WIDEVINE_UUID, schemeData); ParsableByteArray parsablePsshAtom = new ParsableByteArray(psshAtom); assertThat(parsablePsshAtom.readUnsignedIntToInt()).isEqualTo(psshAtom.length); assertThat(parsablePsshAtom.readInt()).isEqualTo(TYPE_pssh); int fullAtomInt = parsablePsshAtom.readInt(); assertThat(parseFullAtomVersion(fullAtomInt)).isEqualTo(0); assertThat(parseFullAtomFlags(fullAtomInt)).isEqualTo(0); UUID systemId = new UUID(parsablePsshAtom.readLong(), parsablePsshAtom.readLong()); assertThat(systemId).isEqualTo(WIDEVINE_UUID); assertThat(parsablePsshAtom.readUnsignedIntToInt()).isEqualTo(schemeData.length); byte[] psshSchemeData = new byte[schemeData.length]; parsablePsshAtom.readBytes(psshSchemeData, 0, schemeData.length); assertThat(psshSchemeData).isEqualTo(schemeData); }
public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) { return buildPsshAtom(systemId, null, data); }
PsshAtomUtil { public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) { return buildPsshAtom(systemId, null, data); } }
PsshAtomUtil { public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) { return buildPsshAtom(systemId, null, data); } private  PsshAtomUtil(); }
PsshAtomUtil { public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) { return buildPsshAtom(systemId, null, data); } private  PsshAtomUtil(); static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data); @SuppressWarnings("ParameterNotNullable") static byte[] buildPsshAtom(
      UUID systemId, @Nullable UUID[] keyIds, @Nullable byte[] data); static boolean isPsshAtom(byte[] data); static @Nullable UUID parseUuid(byte[] atom); static int parseVersion(byte[] atom); static @Nullable byte[] parseSchemeSpecificData(byte[] atom, UUID uuid); }
PsshAtomUtil { public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) { return buildPsshAtom(systemId, null, data); } private  PsshAtomUtil(); static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data); @SuppressWarnings("ParameterNotNullable") static byte[] buildPsshAtom(
      UUID systemId, @Nullable UUID[] keyIds, @Nullable byte[] data); static boolean isPsshAtom(byte[] data); static @Nullable UUID parseUuid(byte[] atom); static int parseVersion(byte[] atom); static @Nullable byte[] parseSchemeSpecificData(byte[] atom, UUID uuid);  }