Package com.io7m.smfj.format.binary2.internal

## Class SMFB2ParsingSectionHeader

- java.lang.Object
- - com.io7m.smfj.format.binary2.internal.SMFB2ParsingSectionHeader

- All Implemented Interfaces:
    `SMFB2StructureParserType<SMFB2Section>`

      public final class SMFB2ParsingSectionHeader
      extends java.lang.Object
      implements SMFB2StructureParserType<SMFB2Section>

  A parser that can parse the section header for an arbitrary section.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SMFB2ParsingSectionHeader()` | Construct a parser.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `checkHeader​(SMFB2ParsingContextType context, com.io7m.jbssio.api.BSSReaderType reader, SMFB2Section header, long expectedMagic, java.lang.String name)` | Check that `header` has the expected ID.
    `SMFB2Section` | `parse​(SMFB2ParsingContextType context)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SMFB2ParsingSectionHeader

          public SMFB2ParsingSectionHeader()

      Construct a parser.

  - ### Method Detail

    - #### checkHeader

          public static boolean checkHeader​(SMFB2ParsingContextType context,
                                            com.io7m.jbssio.api.BSSReaderType reader,
                                            SMFB2Section header,
                                            long expectedMagic,
                                            java.lang.String name)

      Check that `header` has the expected ID. Publish an error to `context` if it does not.
      Parameters:
        `context` - The parsing context
        `reader` - The current reader
        `header` - The header
        `expectedMagic` - The expected magic number
        `name` - The name of the header section
      Returns:
        `true` if the header has the expected value

    - #### parse

          public SMFB2Section parse​(SMFB2ParsingContextType context)
                             throws java.io.IOException

      Specified by:
        `parse` in interface `SMFB2StructureParserType<SMFB2Section>`
      Throws:
        `java.io.IOException`