Class Tag

  • All Implemented Interfaces:
    IoConstants, ITag

    public class Tag
    extends Object
    implements ITag
    A Tag represents the contents or payload of a FLV file.
    Author:
    The Red5 Project, Dominick Accattato (daccattato@gmail.com), Luke Hubbard, Codegent Ltd (luke@codegent.com)
    See Also:
    FLV Tag
    • Constructor Detail

      • Tag

        public Tag​(byte dataType,
                   int timestamp,
                   int bodySize,
                   org.apache.mina.core.buffer.IoBuffer body,
                   int previousTagSize)
        TagImpl Constructor
        Parameters:
        dataType - Tag data type
        timestamp - Timestamp
        bodySize - Tag body size
        body - Tag body
        previousTagSize - Previous tag size information
      • Tag

        public Tag()
        Constructs a new Tag.
    • Method Detail

      • getBitflags

        public byte getBitflags()
        Getter for bit flags
        Returns:
        Value for bit flags
      • setBitflags

        public void setBitflags​(byte bitflags)
        Setter for bit flags
        Parameters:
        bitflags - Bit flags
      • getData

        public org.apache.mina.core.buffer.IoBuffer getData()
        Returns the data as a ByteBuffer
        Specified by:
        getData in interface ITag
        Returns:
        ByteBuffer Data as byte buffer
      • getBody

        public org.apache.mina.core.buffer.IoBuffer getBody()
        Return the body IoBuffer
        Specified by:
        getBody in interface ITag
        Returns:
        Tag body
      • getBodySize

        public int getBodySize()
        Return the size of the body
        Specified by:
        getBodySize in interface ITag
        Returns:
        Tag body size
      • getDataType

        public byte getDataType()
        Get the data type
        Specified by:
        getDataType in interface ITag
        Returns:
        Tag data type
      • getTimestamp

        public int getTimestamp()
        Return the timestamp
        Specified by:
        getTimestamp in interface ITag
        Returns:
        Tag timestamp
      • getPreviousTagSize

        public int getPreviousTagSize()
        Return previous tag size
        Specified by:
        getPreviousTagSize in interface ITag
        Returns:
        Previous tag size
      • toString

        public String toString()
        Prints out the contents of the tag
        Overrides:
        toString in class Object
        Returns:
        Tag contents
      • getType

        public byte getType()
        Getter for tag type
        Returns:
        Tag type
      • setType

        public void setType​(byte type)
        Setter for tag type
        Parameters:
        type - Tag type
      • setBody

        public void setBody​(org.apache.mina.core.buffer.IoBuffer body)
        Set the body ByteBuffer.
        Specified by:
        setBody in interface ITag
        Parameters:
        body - Body as ByteBuffer
      • setBodySize

        public void setBodySize​(int bodySize)
        Set the size of the body.
        Specified by:
        setBodySize in interface ITag
        Parameters:
        bodySize - Body size
      • setDataType

        public void setDataType​(byte dataType)
        Set the data type.
        Specified by:
        setDataType in interface ITag
        Parameters:
        dataType - Data type
      • setTimestamp

        public void setTimestamp​(int timestamp)
        Set the timestamp.
        Specified by:
        setTimestamp in interface ITag
        Parameters:
        timestamp - Timestamp
      • setData

        public void setData()
        Setter for tag data. Empty method.
      • setPreviousTagSize

        public void setPreviousTagSize​(int size)
        Set the size of the previous tag.
        Specified by:
        setPreviousTagSize in interface ITag
        Parameters:
        size - Previous tag size