public MyCustomStringBox() { super(UUIDConverter.convert(UUID.fromString("550e8400-e29b-11d4-a716-446655440000"))); }
@Override protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); assert systemId.length == 16; byteBuffer.put(systemId, 0, 16); if (getVersion() > 0) { IsoTypeWriter.writeUInt32(byteBuffer, keyIds.size()); for (UUID keyId : keyIds) { byteBuffer.put(UUIDConverter.convert(keyId)); } } IsoTypeWriter.writeUInt32(byteBuffer, content.length); byteBuffer.put(content); }
@Override protected void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); byte[] systemIdBytes = new byte[16]; content.get(systemIdBytes); systemId = UUIDConverter.convert(systemIdBytes); int dataSize = CastUtils.l2i(IsoTypeReader.readUInt32(content)); protectionSpecificHeader = ProtectionSpecificHeader.createFor(systemId, content); }
@Override protected void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); systemId = new byte[16]; content.get(systemId); if (getVersion() > 0) { int count = CastUtils.l2i(IsoTypeReader.readUInt32(content)); while (count-- > 0) { byte[] k = new byte[16]; content.get(k); keyIds.add(UUIDConverter.convert(k)); } } long length = IsoTypeReader.readUInt32(content); this.content = new byte[content.remaining()]; content.get(this.content); assert length == this.content.length; } }
@Override protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); assert systemId.length == 16; byteBuffer.put(systemId, 0, 16); if (getVersion() > 0) { IsoTypeWriter.writeUInt32(byteBuffer, keyIds.size()); for (UUID keyId : keyIds) { byteBuffer.put(UUIDConverter.convert(keyId)); } } IsoTypeWriter.writeUInt32(byteBuffer, content.length); byteBuffer.put(content); }
@Override protected void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); systemId = new byte[16]; content.get(systemId); if (getVersion() > 0) { int count = CastUtils.l2i(IsoTypeReader.readUInt32(content)); while (count-- > 0) { byte[] k = new byte[16]; content.get(k); keyIds.add(UUIDConverter.convert(k)); } } long length = IsoTypeReader.readUInt32(content); this.content = new byte[content.remaining()]; content.get(this.content); assert length == this.content.length; } }
@Override protected void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); byte[] systemIdBytes = new byte[16]; content.get(systemIdBytes); systemId = UUIDConverter.convert(systemIdBytes); int dataSize = CastUtils.l2i(IsoTypeReader.readUInt32(content)); protectionSpecificHeader = ProtectionSpecificHeader.createFor(systemId, content); }
representation.getContentProtection().add(dt); byte[] psshContent = pssh.getContent(); dt.setSchemeIdUri("urn:uuid:" + UUIDConverter.convert(pssh.getSystemId()).toString()); if (Arrays.equals(ProtectionSystemSpecificHeaderBox.PLAYREADY_SYSTEM_ID, pssh.getSystemId())) { dt.setValue("MSPR 2.0");