Class MP3Reader

    • Field Detail

      • log

        protected static org.slf4j.Logger log
    • Constructor Detail

      • MP3Reader

        public MP3Reader​(File file)
                  throws IOException
        Creates reader from file input stream
        Parameters:
        file - file input
        Throws:
        IOException - on IO error
    • Method Detail

      • hasVideo

        public boolean hasVideo()
        A MP3 stream never has video.
        Specified by:
        hasVideo in interface ITagReader
        Returns:
        always returns false
      • getOffset

        public int getOffset()
        Returns the offet length
        Specified by:
        getOffset in interface ITagReader
        Returns:
        int
      • getBytesRead

        public long getBytesRead()
        Returns the amount of bytes read
        Specified by:
        getBytesRead in interface ITagReader
        Returns:
        long
      • getDuration

        public long getDuration()
        Return length in seconds
        Specified by:
        getDuration in interface ITagReader
        Returns:
        length in seconds
      • getTotalBytes

        public long getTotalBytes()
        Get the total readable bytes in a file or ByteBuffer.
        Specified by:
        getTotalBytes in interface ITagReader
        Returns:
        Total readable bytes
      • hasMoreTags

        public boolean hasMoreTags()
        Returns a boolean stating whether the FLV has more tags
        Specified by:
        hasMoreTags in interface ITagReader
        Returns:
        boolean
      • readTag

        public ITag readTag()
        Returns a Tag object
        Specified by:
        readTag in interface ITagReader
        Returns:
        Tag
      • close

        public void close()
        Closes the reader and free any allocated memory.
        Specified by:
        close in interface ITagReader
      • decodeHeader

        public void decodeHeader()
        Decode the header of the stream;
        Specified by:
        decodeHeader in interface ITagReader
      • position

        public void position​(long pos)
        Move the reader pointer to given position in file.
        Specified by:
        position in interface ITagReader
        Parameters:
        pos - File position to move to