Class XtraBox

  • All Implemented Interfaces:
    Box, ParsableBox

    public class XtraBox
    extends AbstractBox

    4cc = ""Xtra""

    Windows Media Xtra Box.
    I can't find definitive documentation on this from Microsoft so it's cobbled together from various sources. Mostly ExifTool for Perl.
    Various references: https://msdn.microsoft.com/en-us/library/windows/desktop/dd743066(v=vs.85).aspx https://metacpan.org/source/EXIFTOOL/Image-ExifTool-9.76/lib/Image/ExifTool/Microsoft.pm http://www.ventismedia.com/mantis/view.php?id=12017 http://www.hydrogenaudio.org/forums/index.php?showtopic=75123&st=250 http://www.mediamonkey.com/forum/viewtopic.php?f=1&t=76321 https://code.google.com/p/mp4v2/issues/detail?id=113
    Author:
    marwatk
    • Constructor Detail

      • XtraBox

        public XtraBox()
      • XtraBox

        public XtraBox​(String type)
    • Method Detail

      • _parseDetails

        public void _parseDetails​(ByteBuffer content)
        Description copied from class: AbstractBox
        Parse the box's fields and child boxes if any.
        Specified by:
        _parseDetails in class AbstractBox
        Parameters:
        content - the box's raw content beginning after the 4-cc field.
      • getContent

        protected void getContent​(ByteBuffer byteBuffer)
        Description copied from class: AbstractBox
        Write the box's content into the given ByteBuffer. This must include flags and version in case of a full box. byteBuffer has been initialized with getSize() bytes.
        Specified by:
        getContent in class AbstractBox
        Parameters:
        byteBuffer - the sink for the box's content
      • getAllTagNames

        public String[] getAllTagNames()
        Returns a list of the tag names present in this Xtra Box
        Returns:
        Possibly empty (zero length) array of tag names present
      • getFirstStringValue

        public String getFirstStringValue​(String name)
        Returns the first String value found for this tag
        Parameters:
        name - Tag name
        Returns:
        First String value found
      • getFirstDateValue

        public Date getFirstDateValue​(String name)
        Returns the first Date value found for this tag
        Parameters:
        name - Tag name
        Returns:
        First Date value found
      • getFirstLongValue

        public Long getFirstLongValue​(String name)
        Returns the first Long value found for this tag
        Parameters:
        name - Tag name
        Returns:
        First long value found
      • getValues

        public Object[] getValues​(String name)
        Returns an array of values for this tag. Empty array when tag is not present
        Parameters:
        name - Tag name to retrieve
        Returns:
        Possibly empty array of values (possible types are String, Long, Date and byte[] )
      • removeTag

        public void removeTag​(String name)
        Removes specified tag (all values for that tag will be removed)
        Parameters:
        name - Tag to remove
      • setTagValues

        public void setTagValues​(String name,
                                 String[] values)
        Removes and recreates tag using specified String values
        Parameters:
        name - Tag name to replace
        values - New String values
      • setTagValue

        public void setTagValue​(String name,
                                String value)
        Removes and recreates tag using specified String value
        Parameters:
        name - Tag name to replace
        value - New String value
      • setTagValue

        public void setTagValue​(String name,
                                Date date)
        Removes and recreates tag using specified Date value
        Parameters:
        name - Tag name to replace
        date - New Date value
      • setTagValue

        public void setTagValue​(String name,
                                long value)
        Removes and recreates tag using specified Long value
        Parameters:
        name - Tag name to replace
        value - New Long value