com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class Mp3Format

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, Closeable, AutoCloseable


    public final class Mp3Format
    extends FormatBase

    Represents Mp3 format (MPEG-1 and/or MPEG-2 Audio Layer III). See https://en.wikipedia.org/wiki/MP3".

    • Constructor Detail

      • Mp3Format

        public Mp3Format(String fileName)

        Initializes a new instance of the Mp3Format class.

        Parameters:
        fileName - Absolute path to the file.
      • Mp3Format

        public Mp3Format(InputStream input)

        Initializes a new instance of the Mp3Format class.

        Parameters:
        input - File stream.
    • Method Detail

      • getType

        public int getType()

        Gets document type.

        Specified by:
        getType in class FormatBase
        Returns:
        Document type.
      • getAudioDetails

        public final MpegAudio getAudioDetails()

        Gets the MPEG audio details.

        Returns:
        The audio details.


        Contains information about MPEG encoding details like layer version, bitrate.

      • getId3v1Properties

        public final Id3v1Tag getId3v1Properties()

        Gets the ID3(v1) properties. Provides easy way to ac??ess all propeties. Library updates ID3v1 if specific properties were changed in user code. Otherwise - update will not happen.

        Returns:
        The ID3(v1) properties.


        Library updates ID3v1 if specific properties were changed in user code. Otherwise - update will not happen.

      • getId3v1

        public final Id3v1Tag getId3v1()

        Gets the ID3v1 metadata. See more http://id3.org/ID3v1. Returns null if metadata not found.

        Returns:
        The ID3v1 tag.


        ID3(v1) tag is a small chunk of extra data in the end of MP3. See more http://id3.org/ID3v1.

      • getId3v2

        public final Id3v2Tag getId3v2()

        Gets the ID3v2 tag.

        Returns:
        The ID3v2 tag.


        Apart from Id3v1Tag it allows to store more amount of metadata. Each metadata chunk is presented as tag frame TagFrame.

      • getId3v2Properties

        public final Id3v2Tag getId3v2Properties()

        Gets the ID3(v2) properties. Provides easy way to ac??ess all propeties. Library updates ID3v2 if specific properties were changed in user code. Otherwise - update will not happen.

        Returns:
        The ID3(v2) properties.


        Library updates ID3v2 if specific properties were changed in user code. Otherwise - update will not happen.

      • getLyrics3v2

        public final Lyrics3Tag getLyrics3v2()

        Gets the Lyrics3 metadata version 2.0.

        Returns:
        The Lyrics3v2 tag.
      • getAPEv2

        public final Apev2Metadata getAPEv2()

        Gets the APE v2 metadata.

        Returns:
        The APE v2 metadata.
      • cleanMetadata

        public void cleanMetadata()

        Removes ID3v1/ID3v2/Lyrics3/APE tags.


        This feature is not supported in trial mode.

        Overrides:
        cleanMetadata in class FormatBase
      • getId3v1Tag

        public final Id3v1Tag getId3v1Tag()

        Gets the ID3v1 tag.

        Returns:
        Id3v1Tag.
      • updateId3v1

        public final void updateId3v1(Id3v1Tag tag)

        Updates the ID3v1 tag.

        Parameters:
        tag - ID3v1 tag.


        This feature is not available in trial mode.

      • removeId3v1

        public final void removeId3v1()

        Removes the ID3v1 tag.


        This feature is not available in trial mode.

      • getId3v2Tag

        public final Id3v2Tag getId3v2Tag()

        Gets the ID3v2 tag.

        Returns:
        Id3v2Tag.
      • updateId3v2

        public final void updateId3v2(Id3v2Tag tag)

        Rewrites the ID3v2 tag. If tag is not found that insert it.

        Parameters:
        tag - ID3 v2.* tag.


        This feature is not available in trial mode.

        Throws:
        ArgumentNullException - Tag could not be null.
      • removeId3v2

        public final void removeId3v2()

        Removes the ID3v2 tag.


        This feature is not available in trial mode.

      • getLyrics3Tag

        public final Lyrics3Tag getLyrics3Tag()

        Gets the Lyrics3 v2.00 tag.

        Returns:
        Lyrics3Tag.
      • removeLyrics3v2

        public final void removeLyrics3v2()

        Removes the Lyrics3 v2 tag.


        This feature is not available in trial mode.

      • readAPEv2Tag

        public final Apev2Metadata readAPEv2Tag()

        Reads the APEv2 audio tag.

        Returns:
        Apev2Metadata if tag is found, otherwise null.
      • removeAPEv2

        public final void removeAPEv2()

        Removes the APEv2 audio tag.


        This feature is not available in trial mode.