public final class Mp3Format extends FormatBase
Represents the Mp3 format (MPEG-1 and/or MPEG-2 Audio Layer III). See https://en.wikipedia.org/wiki/MP3".
Constructor and Description |
---|
Mp3Format(InputStream input)
Initializes a new instance of the
Mp3Format class. |
Mp3Format(String fileName)
Initializes a new instance of the
Mp3Format class. |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Removes ID3v1/ID3v2/Lyrics3/APE tags.
|
Apev2Metadata |
getAPEv2()
Gets the APE v2 metadata.
|
MpegAudio |
getAudioDetails()
Gets the MPEG audio details.
|
Id3v1Tag |
getId3v1Properties()
Gets the ID3v1 metadata.
|
Id3v1Tag |
getId3v1Tag()
Gets the ID3v1 tag.
|
Id3v2Tag |
getId3v2Properties()
Gets the ID3v2 tag.
|
Id3v2Tag |
getId3v2Tag()
Gets the ID3v2 tag.
|
Lyrics3Tag |
getLyrics3Tag()
Gets the Lyrics3 v2.00 tag.
|
Lyrics3Tag |
getLyrics3v2Properties()
Gets the Lyrics3 metadata version 2.0.
|
int |
getType()
Gets document type.
|
Apev2Metadata |
readAPEv2Tag()
Reads the APEv2 audio tag.
|
void |
removeAPEv2()
Removes the APEv2 audio tag.
|
void |
removeId3v1()
Removes the ID3v1 tag.
|
void |
removeId3v2()
Removes the ID3v2 tag.
|
void |
removeLyrics3v2()
Removes the Lyrics3 v2 tag.
|
void |
updateId3v1(Id3v1Tag tag)
Updates the ID3v1 tag.
|
void |
updateId3v2(Id3v2Tag tag)
Rewrites the ID3v2 tag.
|
void |
updateLyrics3v2(Lyrics3Tag tag)
Updates the Lyrics3 v2 tag.
|
close, dispose, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public Mp3Format(String fileName)
Initializes a new instance of the Mp3Format
class.
fileName
- Absolute path to the file.public Mp3Format(InputStream input)
Initializes a new instance of the Mp3Format
class.
input
- File stream.public int getType()
Gets document type.
getType
in class FormatBase
public final MpegAudio getAudioDetails()
Gets the MPEG audio details.
public final Id3v1Tag getId3v1Properties()
Gets the ID3v1 metadata. See more at http://id3.org/ID3v1. Returns null if the metadata not found.
public final Id3v2Tag getId3v2Properties()
Gets the ID3v2 tag.
Id3v1Tag
it allows to store more amount of metadata. Each metadata chunk is presented as a tag frame TagFrame
.
public final Lyrics3Tag getLyrics3v2Properties()
Gets the Lyrics3 metadata version 2.0.
public final Apev2Metadata getAPEv2()
Gets the APE v2 metadata.
public void cleanMetadata()
Removes ID3v1/ID3v2/Lyrics3/APE tags.
cleanMetadata
in class FormatBase
public final Id3v1Tag getId3v1Tag()
Gets the ID3v1 tag.
Id3v1Tag
.public final void updateId3v1(Id3v1Tag tag)
Updates the ID3v1 tag.
tag
- ID3v1 tag.
public final void removeId3v1()
Removes the ID3v1 tag.
public final Id3v2Tag getId3v2Tag()
Gets the ID3v2 tag.
Id3v2Tag
.public final void updateId3v2(Id3v2Tag tag)
Rewrites the ID3v2 tag. If tag is not found that inserts it.
tag
- ID3 v2.* tag.
ArgumentNullException
- Tag could not be null.public final void removeId3v2()
Removes the ID3v2 tag.
public final Lyrics3Tag getLyrics3Tag()
Gets the Lyrics3 v2.00 tag.
Lyrics3Tag
.public final void updateLyrics3v2(Lyrics3Tag tag)
Updates the Lyrics3 v2 tag.
tag
- Lyrics3 v2 tag.
public final void removeLyrics3v2()
Removes the Lyrics3 v2 tag.
public final Apev2Metadata readAPEv2Tag()
Reads the APEv2 audio tag.
Apev2Metadata
if tag is found, otherwise null.public final void removeAPEv2()
Removes the APEv2 audio tag.
Copyright © 2019. All rights reserved.