Id3Audio Writer
Builder for ID3 v2.3 tags.
Note: Current is impossible to delete a tag frame after set it. If you need to do that, create a Id3AudioWriter.deepCopy before and modify it, or only don't set the value.
Don't recommend to call Id3AudioWriter.addTag or Id3AudioWriter.toByteArray or Id3AudioWriter.build repeated.
Example:
val writer = Id3AudioWriter()
writer[Id3v2v3TagFrame.TPE1] = listOf("Eminem", "50 Cent")
val tag = writer.addTag()
Content copied to clipboard
Java:
class Id3BuilderJavaTest {
void testId3Writer() {
final var writer = new Id3AudioWriter();
writer.setPadding(0);
// Need to call `.INSTANCE` because is an kotlin object.
writer.set(Id3v2v3TagFrame.TIT2.INSTANCE, "Title");
writer.set(Id3v2v3TagFrame.TPE1.INSTANCE, List.of("Eminem", "50 Cent"));
final byte[] tag = writer.build();
}
}
Content copied to clipboard
See also
Functions
Link copied to clipboard
Deep copy of the current Id3AudioWriter. Include all frames previously added with Id3AudioWriter.set
Link copied to clipboard
implies (id in Id3v2v3TagFrame.stringFrames || id in Id3v2v3TagFrame.urlFrames)
operator fun set(id: Id3v2v3TagFrame.UnsynchronisedLyricsTagFrame, lyrics: String, description: String, language: String)
implies (id == WXXX) where UserDefinedText.value is a link.
Advanced set frame as string
Set various frames of varios type Id3v2v3TagFrame to values
Link copied to clipboard
Build the tag and add it to a new ByteArray.