Class MPEG2Section


  • public class MPEG2Section
    extends Object
    The Class mpeg2Section.
    • Field Detail

      • continuityCounter

        protected int continuityCounter
        The continuity counter.
      • LENGTH_OFFSET

        protected static final int LENGTH_OFFSET
        The Constant LENGTH_OFFSET.
        See Also:
        Constant Field Values
      • LENGTH_SIZE

        protected static final int LENGTH_SIZE
        The Constant LENGTH_SIZE.
        See Also:
        Constant Field Values
      • LENGHT_HIGH_BYTE_MASK

        protected static final byte LENGHT_HIGH_BYTE_MASK
        The Constant LENGHT_HIGH_BYTE_MASK.
        See Also:
        Constant Field Values
      • TABLE_ID_EXT_OFFSET

        protected static final int TABLE_ID_EXT_OFFSET
        The Constant TABLE_ID_EXT_OFFSET.
        See Also:
        Constant Field Values
      • TABLE_ID_EXT_LENGHT

        protected static final int TABLE_ID_EXT_LENGHT
        The Constant TABLE_ID_EXT_LENGHT.
        See Also:
        Constant Field Values
      • VERSION_OFFSET

        protected static final int VERSION_OFFSET
        The Constant VERSION_OFFSET.
        See Also:
        Constant Field Values
      • VERSION_MASK

        protected static final byte VERSION_MASK
        The Constant VERSION_MASK.
        See Also:
        Constant Field Values
      • CURNEXT_OFFSET

        protected static final int CURNEXT_OFFSET
        The Constant CURNEXT_OFFSET.
        See Also:
        Constant Field Values
      • CURNEXT_MASK

        protected static final byte CURNEXT_MASK
        The Constant CURNEXT_MASK.
        See Also:
        Constant Field Values
      • SECTION_OFFSET

        protected static final int SECTION_OFFSET
        The Constant SECTION_OFFSET.
        See Also:
        Constant Field Values
      • LAST_SECTION_OFFSET

        protected static final int LAST_SECTION_OFFSET
        The Constant LAST_SECTION_OFFSET.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MPEG2Section

        public MPEG2Section()
    • Method Detail

      • write

        public int write​(byte[] bytes)
                  throws java.io.IOException
        Write.
        Parameters:
        bytes - the bytes
        Returns:
        the int
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • bytesWritten

        public int bytesWritten()
        Bytes written.
        Returns:
        the int
      • getTableID

        public int getTableID()
        Gets the table id.
        Returns:
        the table id
      • getSectionLength

        public int getSectionLength()
        Gets the section length.
        Returns:
        the section length
      • getTableIDExtension

        public int getTableIDExtension()
        Gets the table id extension.
        Returns:
        the table id extension
      • getVersion

        public int getVersion()
        Gets the version.
        Returns:
        the version
      • isCurrent

        public boolean isCurrent()
        Checks if is current.
        Returns:
        true, if is current
      • getSectionNo

        public int getSectionNo()
        Gets the section no.
        Returns:
        the section no
      • getLastSectionNo

        public int getLastSectionNo()
        Gets the last section no.
        Returns:
        the last section no
      • getAvailableData

        public int getAvailableData()
        Gets the available data.
        Returns:
        the available data
      • CRCIsValid

        public boolean CRCIsValid()
        CRC is valid.
        Returns:
        true, if successful
      • rewind

        public void rewind()
        Rewind.
      • read

        public int read()
        Read.
        Returns:
        the int
      • readBytes

        public int readBytes​(byte[] buf,
                             int offset,
                             int count)
        Read bytes.
        Parameters:
        buf - the buf
        offset - the offset
        count - the count
        Returns:
        the int
      • readInt

        public int readInt​(int count,
                           int mask)
        Read int.
        Parameters:
        count - the count
        mask - the mask
        Returns:
        the int
      • readInt

        public int readInt()
      • skip

        public void skip​(int count)
        Skip.
        Parameters:
        count - the count
      • toString

        public String toString()
        Overrides:
        toString in class Object
      • dumpSection

        public String dumpSection​(String contextStr)
        Dump section.